[rabbitmq-discuss] Consumers stopped consuming messages

Florence Chabanois flocha2000-agile at yahoo.fr
Tue Jul 20 11:38:51 BST 2010

Hi Simon (sorry for answering twice),

Thanks for your reply. We didn't find how to configure 
the basic.qos in the java API. Here is our spike code :

private void consommeEvenements() throws IOException {
Channel channel = acteurRabbitMQ.chaines.get(QUEUE_PRINCIPALE);
    QueueingConsumer consumer = new QueueingConsumer(channel);
    channel.basicConsume(QUEUE_PRINCIPALE.name(), consumer);
while (channel.isOpen()) {
evenementBrut = null;
            EvenementStat evenementRecu = null;
                evenementBrut = consumer.nextDelivery();
            evenementRecu = decode(evenementBrut);
logger.info("evenement recu : " + evenementRecu);
            } catch 
(IOException e) {
                logger.fatal("Soucis de 
deserialize", e);
            } catch (Exception e) {
    logger.error("Soucis d'écriture en base", e);
         if (evenementRecu.estReinjectable()) {
logger.info("--> renvoi de " + evenementRecu);
                } else {
                 logger.info("--> DEAD LETTER " + evenementRecu);
 ackMultiple = false;
            final long deliveryTag = 
logger.info("ACK " + deliveryTag);
channel.basicAck(deliveryTag, ackMultiple);

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. 

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.


--- En date de : Mar 20.7.10, Florence Chabanois <flocha2000-agile at yahoo.fr> a écrit :

De: Simon MacMullen <simon at rabbitmq.com>
Objet: Re: [rabbitmq-discuss] Consumers stopped consuming messages
À: rabbitmq-discuss at lists.rabbitmq.com
Date: Mardi 20 juillet 2010, 11h26

On 20/07/10 09:55, Florence Chabanois wrote:
> We noticed that /*sometimes*/, consumers hang (well, they are not
> blocked, but they dont consume messages anymore). We can see that
> because each consumer save around 100 msg/sec in database, so when one
> is stopping consumming, the overall messages saved per seconds in DB
> fall down with the same ratio (if let say 3 consumers stop, we fall
> around 600 msg/sec to 300 msg/sec).
> FYI there has been a similar issue here, but it wasn't resolved
> http://old.nabble.com/Consumer-stop-to-receive-messages-but-continue-listening-queue-problem.-td27872888.html

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).


* Are you setting the basic.qos prefetch count?
* What does rabbitmqctl lists_queues say about he queue when the system is in this state?
* Are you able to post your spike code anywhere?

Cheers, Simon

-- Simon MacMullen
Staff Engineer, RabbitMQ
SpringSource, a division of VMware

rabbitmq-discuss mailing list
rabbitmq-discuss at lists.rabbitmq.com


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20100720/59dbb7b0/attachment-0001.htm>

More information about the rabbitmq-discuss mailing list