Closed vvoicehovics closed 2 months ago
do a "terminalNack()" which would send the message to deadletters immediately
The behavior you're describing isn't currently supported by Cloud Pub/Sub. If you would like to suggest this as an improvement, please file a ticket here: https://issuetracker.google.com/issues/new?component=187173&template=1162763 We do not have guarantees on when we will implement issues, but issues that have higher number of requests will generally be prioritized.
In the meantime, your workaround seems like the best bet. Re: original message properties, you can copy this over to the message attributes map, though if you aren't retrying the message, then DeliveryCount
will likely be 1 anyway.
Hi,
I have a service that processes many (potentially millions) of pubsub messages via a pull subscription. I have configured a deadletter topic for the subscription with retry policy having 5 retries. Suppose I receive an unprocessable message. This can happen due to various reasons, e.g. validation (i do use schemas, but not all complex field validation can be handled by a schema) or some further missing configuration required for the message to be processed or anything that i know is not transient.
Hence, ideally i would like to
Otherwise i needlessly do x5 work.
I could manually publish the message to deadletters, but:
Strangely i cannot find much info on this. What's the suggested approach? Is this use case so original / am i doing something unexpected?