<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>> 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 : <b>Mar 20.7.10, Simon MacMullen <i><simon@rabbitmq.com></i></b> a écrit :<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>De: Simon MacMullen <simon@rabbitmq.com><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>><br>> Hi Simon (sorry for answering twice),<br>><br>> Thanks for your reply. We didn't find how to configure the basic.qos in<br>> the java API. Here is our spike code :<br>><br>> private void consommeEvenements() throws IOException {<br>> Channel channel = acteurRabbitMQ.chaines.get(QUEUE_PRINCIPALE);<br>> QueueingConsumer consumer = new QueueingConsumer(channel);<br>> channel.basicConsume(QUEUE_PRINCIPALE.name(), consumer);<br>> while (channel.isOpen()) {<br>> QueueingConsumer.Delivery evenementBrut = null;<br>> EvenementStat evenementRecu =
null;<br>> try {<br>> evenementBrut = consumer.nextDelivery();<br>> evenementRecu = decode(evenementBrut);<br>> logger.info("evenement recu : " + evenementRecu);<br>> simuleErreurBaseDeDonnees(evenementRecu);<br>> } catch (IOException e) {<br>> logger.fatal("Soucis de deserialize", e);<br>> } catch (Exception e) {<br>> logger.error("Soucis d'écriture en base", e);<br>> if (evenementRecu.estReinjectable()) {<br>> logger.info("--> renvoi de " + evenementRecu);<br>> programmeRepublication(evenementRecu);<br>> } else {<br>> logger.info("--> DEAD LETTER " + evenementRecu);<br>> acteurRabbitMQ.publie(evenementRecu, QUEUE_DEAD_LETTER);<br>> }<br>> }<br>> boolean ackMultiple = false;<br>> final long deliveryTag = evenementBrut.getEnvelope().getDeliveryTag();<br>> logger.info("ACK " + deliveryTag);<br>> channel.basicAck(deliveryTag, ackMultiple);<br>> }<br>>
acteurRabbitMQ.ferme();<br>> }<br>><br>> Yet, I'm not sure the basic.qos is the issue as long as the 6 consumers<br>> sometimes keep consuming the messages during the 10 minutes bench, and<br>> sometimes not.<br>><br>> When the problem occurs, the list_queues option displays that the queue<br>> starts growing because the "active" (the ones that keep on consuming)<br>> consumers cannot insert in DB the overall messages load fast enough.<br>><br>> Cheers,<br>> Florence.<br>><br>><br>> --- En date de : *Mar 20.7.10, Florence Chabanois<br>> /<<a ymailto="mailto:flocha2000-agile@yahoo.fr" href="/mc/compose?to=flocha2000-agile@yahoo.fr">flocha2000-agile@yahoo.fr</a>>/* a écrit :<br>><br>><br>><br>> De: Simon MacMullen <<a ymailto="mailto:simon@rabbitmq.com" href="/mc/compose?to=simon@rabbitmq.com">simon@rabbitmq.com</a>><br>>
Objet: Re: [rabbitmq-discuss] Consumers stopped consuming messages<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>> Date: Mardi 20 juillet 2010, 11h26<br>><br>> On 20/07/10 09:55, Florence Chabanois wrote:<br>> <snip><br>> > We noticed that /*sometimes*/, consumers hang (well, they are not<br>> > blocked, but they dont consume messages anymore). We can see that<br>> > because each consumer save around 100 msg/sec in database, so<br>> when one<br>> > is
stopping consumming, the overall messages saved per<br>> seconds in DB<br>> > fall down with the same ratio (if let say 3 consumers stop,<br>> we fall<br>> > around 600 msg/sec to 300 msg/sec).<br>> <snip><br>> > FYI there has been a similar issue here, but it wasn't resolved :<br>> ><br>> <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>><br>> Hi Florence. One possibility that was
considered in the linked<br>> thread was that all the messages were being sent to some<br>> consumers due to basic.qos not being set (in the absence of<br>> basic.qos, Rabbit is allowed to do that).<br>><br>> So:<br>><br>> * Are you setting the basic.qos prefetch count?<br>> * What does rabbitmqctl lists_queues say about he queue when the<br>> system is in this state?<br>> * Are you able to post your spike code anywhere?<br>><br>> Cheers, Simon<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>><br>><br>><br>><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><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>