[rabbitmq-discuss] Consumer stop to receive messages but continue listening queue problem.

Bryan Murphy bmurphy1976 at gmail.com
Fri Mar 26 13:33:19 GMT 2010


Another technique we use:

Start one consumer.

Start your other consumers.

Restart the first consumer.

This let's you keep the high prefetch settings while still getting the
messages to distribute more evenly.

Bryan

On Fri, Mar 26, 2010 at 6:08 AM, Matthias Radestock <matthias at lshift.net>wrote:

> Gustavo,
>
> Gustavo Aquino wrote:
> > 1- Start RabbitMQ
> > 2- Start 8 consumers in concurrent mode (8 consumers at same time).
> > 3- Start producer
> > 4- Fating queue with ~3000 messages per second having ~400bytes
> > 5- When queue have ~170.000 stop consumers and producer
> > 6- Start consumers in concurrent mode(8 consumers at same time)
> >
> > After that, consumers are connected to Rabbit, but if you take a look
> > about queue consumers, we have only 3 or 4 consumers... all others are
> > waiting something but don't consume nothing.
>
> You need to set a basic.qos prefetch limit, e.g. using
>
> http://www.rabbitmq.com/releases/rabbitmq-java-client/v1.7.2/rabbitmq-java-client-javadoc-1.7.2/com/rabbitmq/client/Channel.html#basicQos(int,%20int,%20boolean)<http://www.rabbitmq.com/releases/rabbitmq-java-client/v1.7.2/rabbitmq-java-client-javadoc-1.7.2/com/rabbitmq/client/Channel.html#basicQos%28int,%20int,%20boolean%29>
> .
> to place a limit on the number of messages the server will send to a
> client w/o waiting for acknowledgement. Otherwise, when the first
> consumer starts consuming from a queue it will get sent all the queue's
> messages (network capacity permitting).
>
>
> Matthias.
>
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20100326/eeb52326/attachment.htm 


More information about the rabbitmq-discuss mailing list