[rabbitmq-discuss] ACKs getting lost

Tobias Gutzmann Tobias.Gutzmann at ist.com
Mon Feb 24 08:38:05 GMT 2014


Hi,



Maybe the "multiple" flag is set for some ACKs but you don't look at that flag? You would potentially have to remove more than one message from the dictionary in that case.



/Tobias


Från: rabbitmq-discuss [mailto:rabbitmq-discuss-bounces at lists.rabbitmq.com] För Michael Collins
Skickat: den 22 februari 2014 01:21
Till: rabbitmq-discuss at lists.rabbitmq.com
Ämne: [rabbitmq-discuss] ACKs getting lost

We're using RabbitMQ 3.2.2 and Erlang R16B03 on Windows and using the RabbitMQ.Client API to implement a message bus over RabbitMQ.

I am testing a scenario where I have an exchange and durable queues with auto-acknowledge set to false. If I publish a number of messages (say 100 messages), my receiver receives all 100 messages and sends back 100 ACKs using IModel.BasicAck(). My receiver is using a QueueingBasicConsumer object to receive the messages from RabbitMQ.

On the sender side, I am keeping the messages in a dictionary in memory keyed by the delivery tag of the message. When I receive an ACK, then I remove that message from the dictionary. What I am noticing is that when I send a batch of 100 messages, and the receiver says that it sends back 100 ACKS, there are sometimes 3-5 messages remaining in my dictionary that the sender didn't receive an ACK for.

I set up tracing on both applications and watched them run in batches of 100 or 1000. All of the messages were received and ACK'd by the receiver, but again, somewhere between 3-10 messages (depending on the batch size) are not getting ACK'd at the sender side.

I'm watching for ACKs, NACKs, and returns using the IModel.BasicAcks, IModel.BasicNacks, and IModel.BasicReturn events. I'm not getting back NACKs or returns either.

I tried changing my configuration to use auto-acknowledge on the receiver side. I'm seeing the behavior, but not as bad. With auto-acknowledge, it's about 1-3 messages per batch that are not receiving ACKs. These tests were also run on a single server, but we first noticed it when running in a RabbitMQ cluster.

Can anyone suggest ideas for diagnosing what the issue is or how to figure out where the ACKs are getting lost?

Thanks.

Michael Collins


Confidentiality Notice: This email and any attachments are confidential. If you have received this in error, please let us know by email reply and delete the email and all attachments from your system.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20140224/7f104d22/attachment.html>


More information about the rabbitmq-discuss mailing list