In Google Cloud PubSub you tipically have subscriptions attached to a topic. I saw a new option to "detach" a subscription from the topic.
My app was having issues so I detached the subscription from the topic instead of deleting it, I thought it was an easy way to "give my app a break". The issue is, it seems that I cannot reattach the subscription to the topic anymore.
According to this document I can infer that it is not possible to get a subscription to reattach to a topic: https://cloud.google.com/pubsub/docs/admin#detaching_subscriptions
My questions are:
- is there a way to reactivate a subscription after it has been detached (I assume no).
- what is the recommended way to put a "pause" to a subscription in order to give my system some breath room until I get it back up?
Thanks for your help 🙂
Best Answer
As per the GCP documentation,
Regarding the pause, there is no such option, however, if you are having a pull subscription, you control when to initiate requests to the Pub/Sub server to retrieve messages.
Thus, if you are having a push subscription, you can change it to pull in order to temporarily stop Pub/Sub from sending requests to the push endpoint, and then set the URL to a valid endpoint again to resume push delivery - Stopping and resuming delivery.