Reputation: 2823
As the maximum duration for the retention of an 'undelivered' message is 7 days, I am curious as to what a NACK does as regards keeping the message 'alive'.
For example, if I NACK a message one day before its expiry does it get a fresh lease of 7 days before it's dropped, or does it die the next day itself?
I am unsure of of how to interpret the language of this documentation as a NACKed message technically hasn't failed to deliver, but has been refused by the Subscriber.
Upvotes: 1
Views: 1516
Reputation: 17251
"Delivered" in this context would mean "Google Cloud Pub/Sub sent the message to the subscriber and that subscriber acknowledged the message." It would be like when UPS requires a signature for a package: the package is delivered when you sign for it and take it, not when they knock on your door and you don't answer (or perhaps nack would be equivalent to you saying "go away, I'm not coming to the door").
The 7 day retention policy is from the time the message is published. The clock does not reset if a message is acked. If the subscriber receives a message a day before its expiry time and nacks it, redelivery would only be attempted for one more day, not for seven additional days.
Upvotes: 2