Another technique we use:<br><br>Start one consumer.<br><br>Start your other consumers.<br><br>Restart the first consumer.<br><br>This let's you keep the high prefetch settings while still getting the messages to distribute more evenly.<br>
<br>Bryan<br><br><div class="gmail_quote">On Fri, Mar 26, 2010 at 6:08 AM, Matthias Radestock <span dir="ltr"><<a href="mailto:matthias@lshift.net">matthias@lshift.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Gustavo,<br>
<br>
Gustavo Aquino wrote:<br>
> 1- Start RabbitMQ<br>
> 2- Start 8 consumers in concurrent mode (8 consumers at same time).<br>
> 3- Start producer<br>
> 4- Fating queue with ~3000 messages per second having ~400bytes<br>
> 5- When queue have ~170.000 stop consumers and producer<br>
> 6- Start consumers in concurrent mode(8 consumers at same time)<br>
><br>
> After that, consumers are connected to Rabbit, but if you take a look<br>
> about queue consumers, we have only 3 or 4 consumers... all others are<br>
> waiting something but don't consume nothing.<br>
<br>
You need to set a basic.qos prefetch limit, e.g. using<br>
<a href="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" target="_blank">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)</a>.<br>
to place a limit on the number of messages the server will send to a<br>
client w/o waiting for acknowledgement. Otherwise, when the first<br>
consumer starts consuming from a queue it will get sent all the queue's<br>
messages (network capacity permitting).<br>
<div><div></div><div class="h5"><br>
<br>
Matthias.<br>
<br>
_______________________________________________<br>
rabbitmq-discuss mailing list<br>
<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a><br>
<a href="http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a><br>
</div></div></blockquote></div><br>