Closed doubliez closed 6 years ago
After further investigation, it turns out I need to use noBatch: true
on the queue to get the behavior I want, i.e. the ability to acknowledge messages that come after an unacked message. If I'm not mistaken batching relies on RabbitMQ multiple acknowledgements which only support acknowledging up to a certain message, so I understand why rabbot cannot send a batch ack when the first message in the batch is unacked.
I have the following scenario:
I noticed that a single "pending" message (not acked, nacked or rejected yet) will prevent all following messages from being acked, i.e. calling
msg.ack()
has no effect and they stay "unacked" in the queue.As I was debugging, it seems like there's some logic in the batching of acks done by rabbot that prevents the acks from being sent in this case (until the pending message gets acked/nacked).
Can you confirm that it's the current behavior of rabbot? If it is it should really be fixed because unacked messages shouldn't prevent other messages from being acked.