On Fri, May 7, 2010 at 2:49 PM, Matthew Sackman <span dir="ltr">&lt;<a href="mailto:matthew@lshift.net">matthew@lshift.net</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Hi Mario,<br>
<div class="im"><br>
On Fri, May 07, 2010 at 02:43:42PM +0100, <a href="mailto:mmenti@gmail.com">mmenti@gmail.com</a> wrote:<br>
&gt; We&#39;ve been seeing an issue where the number of unack&#39;ed messages suddenly<br>
&gt; starts growing much larger than the number of connected consumers, whenever<br>
&gt; the queue gets to a certain size �(somewhere around 50k messages in the<br>
&gt; queue, with 250 consumers connected). We&#39;ve noticed that by reducing the<br>
&gt; number of consumers, the issue becomes less pronounced, but was wondering if<br>
&gt; anyone else is seeing this, and if there&#39;s any ways to avoid this? We&#39;re<br>
&gt; using rabbitmq 1.7.0 on an 64-bit Amazon EC2 Ubuntu 8.04 hardy AMI.<br>
<br>
</div>There are two parts to this issue. Firstly, some priorities of messages<br>
internally were changed either in 1.7.1 or 1.7.2 so that acks would have<br>
higher priority internally than publishes. This helps solve this<br>
problem, and so I would recommend you upgrade.<br></blockquote><div><br></div><div>Thanks, good to know - we&#39;ll try and do that as soon as is feasible.</div><div>�</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">


<br>
Secondly, you can help by setting a qos prefetch count on your consumers<br>
- if, say, you set it to 10, then you&#39;re ensuring that each consumer<br>
will only receive 10 messages before it must a) ack a message and b)<br>
that ack is received *and*processed* by Rabbit. This will ensure the<br>
unacked message count stays low.<br></blockquote><div><br></div><div><br></div><div>Strangely we already have prefetch set to 1 on the consumers, and still see this issue.</div><div>�</div></div>