[rabbitmq-discuss] multiple consumers on one channel?
tsuraan
tsuraan at gmail.com
Thu Jul 2 20:51:59 BST 2009
Ok, this is strange. I can't even get two subscriptions on the same
connection, using different channels. If I make a different
connection for each consumer, then I get messages simultaneously. If
I have my two channels on the same connection, I get all the messages
from one of the queues, then all the messages from the other one.
I've included some pretty ugly code to demonstrate parallel consumers.
If you change main() to only use one connection and two channels, you
can see it draining messages from the first queue at one message per
second, then draining messages from the second queue at the same rate.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ChannelTest.java
Type: text/x-java
Size: 2417 bytes
Desc: not available
Url : http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20090702/4f09a2a5/attachment.java
More information about the rabbitmq-discuss
mailing list