Reputation: 2873
I am using GCP Pubsub to send and receive JSON data, Pubsub has a feature to retain a message from a time period of 10 minutes up to 7 days and not less than 10 minutes (according to the official documentation). Is there any way to delete a pulled message from Pubsub? If not, then why do we say that Pubsub is a "Queuing technique" when we willingly cannot delete a message from a message store which violates a basic queue property?
I am using python Pubsub client library for the scripting purpose.
Upvotes: 9
Views: 21875
Reputation: 1175
If needed, you can also perform a purge inside the subscriber section and that will acknowledge all of the message currently waiting inside the store for that specific subscriber.
Go to subscriptions -> specific subscriber -> purge messages
Upvotes: 19
Reputation: 17271
Messages are retained by Google Cloud Pub/Sub under two conditions:
Once you have received a message and called ack on it within the ack deadline, the message will no longer be redelivered for that subscription (other than duplicates that can happen given that Pub/Sub has at-least-once delivery semantics).
Upvotes: 7