<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><br>Hi Simon (sorry for answering twice),<br><br>Thanks for your reply. We didn't find how to configure
the basic.qos in 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 sometimes keep consuming the
messages during the 10 minutes bench, and sometimes not. <br><br>When
the problem occurs, the list_queues option displays that the queue
starts growing because the "active" (the ones that keep on consuming)
consumers cannot insert in DB the overall messages load fast enough.<br><br>Cheers,
<br>Florence.<br><br><br>--- En date de : <b>Mar 20.7.10, Florence Chabanois <i><flocha2000-agile@yahoo.fr></i></b> a écrit :<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><div id="yiv1505816307"><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font: inherit;" valign="top"><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br><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, 11h26<br><br><div class="plainMail">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 when one<br>> is stopping consumming, the overall messages saved per seconds in DB<br>> fall down with the same ratio (if let say 3 consumers stop, 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>> <a rel="nofollow" target="_blank" href="http://old.nabble.com/Consumer-stop-to-receive-messages-but-continue-listening-queue-problem.-td27872888.html">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 thread was that all the messages were being sent to some consumers due to basic.qos not being set (in the absence of 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 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
rel="nofollow">rabbitmq-discuss@lists.rabbitmq.com</a><br><a rel="nofollow" target="_blank" href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss">https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a><br></div></blockquote></td></tr></tbody></table><br>
</div></blockquote></td></tr></table><br>