Reputation: 1151
If I delete a google cloud function and redeploy the same function a day later will I have lost the pub/sub messages that trigger it for that day?
Upvotes: 1
Views: 714
Reputation: 75930
It depends how you have deployed your Cloud Functions
If you delete your Cloud Functions, the Pubsub subscription continue to live and to receive the messages. They are kept up to their expiration deadline. The push HTTP call fails in error continuously because the Cloud Functions no longer exists.
If you redeploy the Cloud Functions, on the same project, with the same name, the HTTP url will again exist and the messages will be delivered, without lost.
If you delete the Cloud Functions, the PubSub subscription, created automatically, will be deleted automatically. So, the existing messages and the new ones will be lost, because there is no subscription to accept and store them.
Upvotes: 3