<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">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.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">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.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">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.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">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.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">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.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">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.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Can anyone suggest ideas for diagnosing what the issue is or how to figure out where the ACKs are getting lost?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Michael Collins<o:p></o:p></p>
</div>
<br>
<br>
<span style="font-size:7.5pt;
font-family:"Arial","sans-serif";color:#1F497D">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.</span>
</body>
</html>