[rabbitmq-discuss] rabbitmq-c -- multiple exectables receiving same message
Lowell.Boggs at emc.com
Lowell.Boggs at emc.com
Thu Jun 30 22:27:37 BST 2011
I am confused by my experiments with rabbitmq-c.
I was trying to follow the task worker tutorial:
http://www.rabbitmq.com/tutorials/tutorial-two-python.html
Of course, I'm using C interfaces not the python or Java interfaces.
Being a newbie it is probable that I'm doing something wrong, but:
The tutorial implies to me that if I have:
* one exchange+topic
* two worker executables that read from it
then
* due to round-robin processing, some messages will go to one executable
* other messages will go to the other
However, I am seeing that both exectuables receive all the messages -- which is not at all what I want.
Is this supposed to work with the default version of rabbitmq-c?
Immediately upon logging into the channel, in the consumers, I am setting
basic_qos(conn, 1, 0, 1, 0);
Also, I am calling basic_consume like this:
amqp_basic_consume(conn,
1,
amqp_cstring_bytes(queuename),
amqp_empty_bytes,
0,
0,
0,
amqp_empty_table
);
The exchange that i am using is amq.direct. I have tried an empty string queue name as well as "hello".
I am calling basic_ack() as soon as I receive the messages in both worker executables -- well, after I log their reception.
Any ideas?
Thanks,
Lowell
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20110630/e5c236eb/attachment.htm>
More information about the rabbitmq-discuss
mailing list