[rabbitmq-discuss] Single Queue With Multiple Consumers

DarthMaul screechrocks at gmail.com
Sat Jul 16 03:06:18 BST 2011


I would like to implement a messaging strategy in RabbitMQ that seems
really simple, but I can't figure out how to configure it.
Essentially, I want to have all message producers send messages to a
single queue. Meanwhile, there are any number of message consumers
ready to consume messages off the queue, but each message should be
processed only once.

So lets say you have 1 producer, 20 messages, and 5 consumers. I want
each consumer to be "assigned" one message to start it off, so 15
messages are left. Then as each consumer gets done, he grabs the next
one. And so on.

Essentially, this is what happens at your local bank--one line and
multiple tellers.

Any insight into how to pull this off--or a better approach
altogether--is appreciated.

Thanks.


More information about the rabbitmq-discuss mailing list