<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><br>I assume you have checked that the consumers are idle and waiting for <br>message
 deliveries (with Ctrl+Break / SIGQUIT). Does anything appear in <br>the
 server logs when consumers stop consuming?<br><br>&gt; we used "ps aux | grep " to see if the consumers were still running and only checked the consumers logs not the brokers'. I'll let you know if I see anything here.<br><br>Cheers,<br>Florence.<br><br>--- En date de&nbsp;: <b>Mar 20.7.10, Simon MacMullen <i>&lt;simon@rabbitmq.com&gt;</i></b> a �crit&nbsp;:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>De: Simon MacMullen &lt;simon@rabbitmq.com&gt;<br>Objet: Re: [rabbitmq-discuss] Consumers stopped consuming messages<br>�: rabbitmq-discuss@lists.rabbitmq.com<br>Date: Mardi 20 juillet 2010, 17h07<br><br><div class="plainMail">Hi Florence. As far as I can see this is reasonable. It's always worth <br>setting the prefetch count when using basic.consume (add a line like:<br><br>channel.basicQos(100);<br><br>before the channel.basicConsume line in order to ensure you never have <br>more than 100
 messages queued up in your QueueingConsumer). However, I <br>don't think that's your problem.<br><br>I assume you have checked that the consumers are idle and waiting for <br>message deliveries (with Ctrl+Break / SIGQUIT). Does anything appear in <br>the server logs when consumers stop consuming?<br><br>Cheers, Simon<br><br>On 20/07/10 11:38, Florence Chabanois wrote:<br>&gt;<br>&gt; Hi Simon (sorry for answering twice),<br>&gt;<br>&gt; Thanks for your reply. We didn't find how to configure the basic.qos in<br>&gt; the java API. Here is our spike code :<br>&gt;<br>&gt; private void consommeEvenements() throws IOException {<br>&gt; Channel channel = acteurRabbitMQ.chaines.get(QUEUE_PRINCIPALE);<br>&gt; QueueingConsumer consumer = new QueueingConsumer(channel);<br>&gt; channel.basicConsume(QUEUE_PRINCIPALE.name(), consumer);<br>&gt; while (channel.isOpen()) {<br>&gt; QueueingConsumer.Delivery evenementBrut = null;<br>&gt; EvenementStat evenementRecu =
 null;<br>&gt; try {<br>&gt; evenementBrut = consumer.nextDelivery();<br>&gt; evenementRecu = decode(evenementBrut);<br>&gt; logger.info("evenement recu : " + evenementRecu);<br>&gt; simuleErreurBaseDeDonnees(evenementRecu);<br>&gt; } catch (IOException e) {<br>&gt; logger.fatal("Soucis de deserialize", e);<br>&gt; } catch (Exception e) {<br>&gt; logger.error("Soucis d'�criture en base", e);<br>&gt; if (evenementRecu.estReinjectable()) {<br>&gt; logger.info("--&gt; renvoi de " + evenementRecu);<br>&gt; programmeRepublication(evenementRecu);<br>&gt; } else {<br>&gt; logger.info("--&gt; DEAD LETTER " + evenementRecu);<br>&gt; acteurRabbitMQ.publie(evenementRecu, QUEUE_DEAD_LETTER);<br>&gt; }<br>&gt; }<br>&gt; boolean ackMultiple = false;<br>&gt; final long deliveryTag = evenementBrut.getEnvelope().getDeliveryTag();<br>&gt; logger.info("ACK " + deliveryTag);<br>&gt; channel.basicAck(deliveryTag, ackMultiple);<br>&gt; }<br>&gt;
 acteurRabbitMQ.ferme();<br>&gt; }<br>&gt;<br>&gt; Yet, I'm not sure the basic.qos is the issue as long as the 6 consumers<br>&gt; sometimes keep consuming the messages during the 10 minutes bench, and<br>&gt; sometimes not.<br>&gt;<br>&gt; When the problem occurs, the list_queues option displays that the queue<br>&gt; starts growing because the "active" (the ones that keep on consuming)<br>&gt; consumers cannot insert in DB the overall messages load fast enough.<br>&gt;<br>&gt; Cheers,<br>&gt; Florence.<br>&gt;<br>&gt;<br>&gt; --- En date de : *Mar 20.7.10, Florence Chabanois<br>&gt; /&lt;<a ymailto="mailto:flocha2000-agile@yahoo.fr" href="/mc/compose?to=flocha2000-agile@yahoo.fr">flocha2000-agile@yahoo.fr</a>&gt;/* a �crit :<br>&gt;<br>&gt;<br>&gt;<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;De: Simon MacMullen &lt;<a ymailto="mailto:simon@rabbitmq.com" href="/mc/compose?to=simon@rabbitmq.com">simon@rabbitmq.com</a>&gt;<br>&gt;&nbsp; &nbsp; &nbsp;
 &nbsp;&nbsp;&nbsp;Objet: Re: [rabbitmq-discuss] Consumers stopped consuming messages<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;�: <a ymailto="mailto:rabbitmq-discuss@lists.rabbitmq.com" href="/mc/compose?to=rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a><br>&gt;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;Date: Mardi 20 juillet 2010, 11h26<br>&gt;<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;On 20/07/10 09:55, Florence Chabanois wrote:<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;&lt;snip&gt;<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &gt; We noticed that /*sometimes*/, consumers hang (well, they are not<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &gt; blocked, but they dont consume messages anymore). We can see that<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &gt; because each consumer save around 100 msg/sec in database, so<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;when one<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &gt; is
 stopping consumming, the overall messages saved per<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;seconds in DB<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &gt; fall down with the same ratio (if let say 3 consumers stop,<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;we fall<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &gt; around 600 msg/sec to 300 msg/sec).<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;&lt;snip&gt;<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &gt; FYI there has been a similar issue here, but it wasn't resolved :<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &gt;<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;<a href="http://old.nabble.com/Consumer-stop-to-receive-messages-but-continue-listening-queue-problem.-td27872888.html" target="_blank">http://old.nabble.com/Consumer-stop-to-receive-messages-but-continue-listening-queue-problem.-td27872888.html</a><br>&gt;<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;Hi Florence. One possibility that was
 considered in the linked<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;thread was that all the messages were being sent to some<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;consumers due to basic.qos not being set (in the absence of<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;basic.qos, Rabbit is allowed to do that).<br>&gt;<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;So:<br>&gt;<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;* Are you setting the basic.qos prefetch count?<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;* What does rabbitmqctl lists_queues say about he queue when the<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;system is in this state?<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;* Are you able to post your spike code anywhere?<br>&gt;<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;Cheers, Simon<br>&gt;<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;-- Simon MacMullen<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;Staff Engineer,
 RabbitMQ<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;SpringSource, a division of VMware<br>&gt;<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;_______________________________________________<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;rabbitmq-discuss mailing list<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;<a ymailto="mailto:rabbitmq-discuss@lists.rabbitmq.com" href="/mc/compose?to=rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a><br>&gt;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;<a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a><br>&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt; _______________________________________________<br>&gt; rabbitmq-discuss mailing list<br>&gt; <a ymailto="mailto:rabbitmq-discuss@lists.rabbitmq.com"
 href="/mc/compose?to=rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a><br>&gt; <a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a><br><br><br>-- <br>Simon MacMullen<br>Staff Engineer, RabbitMQ<br>SpringSource, a division of VMware<br><br>_______________________________________________<br>rabbitmq-discuss mailing list<br><a ymailto="mailto:rabbitmq-discuss@lists.rabbitmq.com" href="/mc/compose?to=rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a><br><a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a><br></div></blockquote></td></tr></table><br>