[rabbitmq-discuss] New consumers for a queue are not receiving any messages (Solved)

Allan Kamau kamauallan at gmail.com
Tue Apr 19 06:55:19 BST 2011


On Tue, Apr 19, 2011 at 8:33 AM, Allan Kamau <kamauallan at gmail.com> wrote:
> Is it possible to populate a queue then start multiple consumers to
> receive messages from the given queue without having the queue
> restricted to a single consumer's connection.
>
> From using the provided Java Client examples, it seems that when a
> queue is populated before the existence of any consumers, the first
> consumer to be started will have exclusive connection to the this
> queue, other client instances and/or threads will wait and not receive
> any message(s). Is this expected, is there a way to allow for
> instances of consumers started after the first message has been
> consumed from a particular queue to also participate in the
> consumption of the remaining messages in the queue?
>
> Allan.
>

After further reading of "RabbitMQ tutorial". Passing a value of 1 to
the basicQos method of the Channel instance of the consumers seems to
disable the round robin effect and provide the behaviour I am looking
for.

Allan.


More information about the rabbitmq-discuss mailing list