question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

unacked messages being redelivered

See original GitHub issue

From @rhodgkins on November 23, 2017 15:19

In previous (I think v0.12 and lower) versions of pubsub messages were auto acked upon receiving a message (or if this was turned off, had to be manually acked). As I understood this had to happen within the ackDeadlineSeconds time and this could be modified with subscription.modifyAckDeadline().

Now the newer version (v0.15), from looking at the code, uses timers to “lease” out the message (using the acDeadlineSeconds time as the initial lease interval), automatically extending the ack deadline until either message.ack() or message.nack() is called? What happens if you don’t do this for a long period of time? Does the lease timer keep on and on extending the ack deadline?

The reason I’m asking for clarification is that I’ve seen unacked (that is neither .ack() or .nack() has been called on the message) messages being delivered again after a period of time.

So the following would happen:

  1. Message A published
  2. Message A received and not acked or nacked
  3. Period of time passes - say 3 mins
  4. Message A is received again

I’ve also had it where I’ve nacked a message and the current message I’m processing is delivered again.

  1. Message A published
  2. Message A received and not acked or nacked
  3. Message B published and nacked
  4. Message A is received again

I’ll try and post some replication steps for the latter issue (its not consistent when I have seen it), but if anyone can confirm by above questions that would be great! Cheers!

Copied from original issue: GoogleCloudPlatform/google-cloud-node#2756

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:21 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
callmehiphopcommented, Nov 27, 2017

@rhodgkins thanks for opening this, I need to dig into this a little more, but I think there could be a latency issue where we try and extend the ack deadline but before the request is sent it expires - hence the redelivery.

1reaction
rhodgkinscommented, Jan 25, 2018

@kir-titievsky yeh it looks much better just from a brief test! I’ll keep an eye on the test env we’re using it in and report back. Thanks again for your help 🙂

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I have RabbitMQ redeliver unacknowledged messages?
To be even more confident, put a some messages in the queue and ensure they both consume concurrently. Also, use rabbitmq:3-management docker ...
Read more >
How do I have RabbitMQ redeliver ... - Google Groups
Soon after the worker dies all unacknowledged messages will be redelivered. I spawn two consumers, and when I CTRL+C one of them, the...
Read more >
RabbitMQ redelivery pitfalls - formapro
The unacknowledged message is returned to the head of the queue, not to the tail as you might think. Here are the consequences...
Read more >
Working With RabbitMQ Unacked Messages Simplified 101
RabbitMQ Uacked Messages are unacknowledged messages. In RabbitMQ, when many messages are delivered to the consumer or the target.
Read more >
Client Acknowledgement & Unacked messages
When the application flow is reestablished, any unacked messages can be safely redelivered since we know the original flow it was delivered ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found