Add Retry Count to Pub/Sub
The way we plan to work with Pub/Sub is by pulling messages by workers. Let's say certain worker pulls the message but unable to process it. The unacknowledged message goes back to queue and will be pulled by another worker. This loop can continue indefinitely unless the 7 days limit of max message age is reached.
It would be great to being able to set max retry count which will move the message to dead-messages-queue topic after exhausting the retry limit for the message.
Kir Titievsky commented
This is now available in GA. Please see https://cloud.google.com/pubsub/docs/dead-letter-topics
Renxia Wang commented
after 1029 days we are still missing this feature.
cannot imagine that such basic feature still not implemented yet.
Rene Kroon commented
For me the count does not even have to be accurate, as long as we can establish that the message is rejected a few times on the consumer side. Now we have to rely on timings only and that is less ideal : any consumer downtime will be interpreted as 'message can not be processed in a valid way' as opposed to 'the message was only tried 2 times, so the consumer was unable to try the allowed 5 times'
Marcin Szyszko commented
I would absolutely love this feature.
Joshua Fox commented
Our distributed systems absolutely require this to avoid unlimited retries. Ad-hoc implementations, storing the retry count, are a kludge. This is an essential part of the system.
I agree, we did a manual retry mechanism in writing the retry count to the message headers.
This is a basic requirement. Not having this is a deal breaker.
I agree, encountered the same problem.