-
Notifications
You must be signed in to change notification settings - Fork 227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Messages not emitted in time for processing, resulting in failed ack deadline extensions and redeliveries #1848
Comments
After investigating this further, I narrowed the issue down (will update the title to match) The issue can be reproduced given the following: a) a topic with a few hundred messages
c) message processing can take minutes While this makes sense if you consider the If I want to process, for example, 500 messages at a time max with the above subscription config and manually extend each message’s ack deadline upon receipt without bumping into the problem described above, what options are there ? One option I see is restricting the number of streams to 1, thus eliminating the possibility of "excess" messages not being emitted or their ack deadlines not extended. |
Apologies for the slow response on this issue. First, are you still encountering this issue? If so, regarding manual lease management, is there a reason you prefer to do that versus the library's lease management? |
@hongalex, thanks for responding. yes, the issue persists. |
Also apologies for missing a few of your questions last time:
This value is indeed set per stream. This is something we're interested in fixing, since we want to make maxMessages / numStreams = the server side flow control amount we allow per stream instead. However, this is technically a breaking change so this might need to wait until we do a major version bump.
This can be done by setting "minAckDeadline" setting passed in as SubscriberOptions. |
I wanted to clarify that |
@hongalex What is the expected process to allow our consuming code (message callback) to keep extending the ack deadline? E.g. I get a message and start processing some long running operation. At each step of the operation I want to keep telling pub/sub 'hey, wait for us another 10 minutes'. If all steps finished, I will issue a If my process crashes and burns I want that deadline to still be at least 10 minutes from my last extend so there is a bit of a cooldown before redrive (and I do NOT want the automatic exponential backoff in redrive because if I nacked a message I want it resent straightaway, but if I abandoned it then I want there to be a delay). At the moment we are making these |
Description
Hello, I've been experiencing message redeliveries when using a subscription with exactly once delivery enabled where batches of messages are published. It is not clear whether this is a client or product issue, therefore I first wanted to make sure there is no misunderstanding/misconfiguration on my side.
Environment details
@google-cloud/pubsub
version: v4.0.5Steps to reproduce
e.g.
As I understand the documentation here for EOD (https://cloud.google.com/pubsub/docs/exactly-once-delivery), as long as
the message should not get redelivered (but it is).
Is there something I am missing/doing incorrectly or this is expected behaviour?
The text was updated successfully, but these errors were encountered: