Flush messages with nack
on subscriber close
#1860
Labels
api: pubsub
Issues related to the googleapis/nodejs-pubsub API.
priority: p3
Desirable enhancement or fix. May not be included in next release.
type: feature request
‘Nice-to-have’ improvement, new feature or different behavior or design.
Hey!
Problem
When closing the connection, there is no easy way to
nack
all messages remaining in the queue. This leads to our P99 delivery time of messages to inflate. It is fairly common for a pod to be pre-empted, which means there is a fairly short window to closedown processing, and it is not realistic to wait until all processing is complete.
In the event of a connection closing, it is extremely difficult to ensure that all messages are
nack
without building my own version of a lease manager to track messages.I noticed in LeaseManager.close, it wipes the local state. Can this just be updated to
nack
everything, and then wipe?The text was updated successfully, but these errors were encountered: