I found a two sources that indirectly reference the fact that when creating Google Cloud PubSub subscriptions with Firebase (using the firebase-functions/v1 npm package), Firebase automatically creates the PubSub Topics and PubSub subscriptions:
- Cap your Firebase spending #1: Setting up a billing PubSub topic (YouTube)
- Firebase PubSub Trigger with Message Ordering (StackOverflow)
As a result, you do not need to (for example) use $ gcloud pubsub topics create $TOPIC_NAME and $ gcloud pubsub subscriptions create $SUBSCRIPTION_NAME to create the topic and subscriptions.
Is this behavior actually documented anywhere?
I would like to create my PubSub subscriptions outside of Firebase. This enables me to create subscriptions using the "dead letter topic" feature and enables me to consistently document my Topics and Subscriptions within my larger Google Cloud Project.
Is it possible to deploy cloud functions within my Firebase project that listen to subscriptions created outside of Firebase?
For example, could I deploy Firebase cloud functions that use the @google-cloud/pubsub npm package instead of firebase-functions/v1?