<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.19088"></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=488090114-01072011><FONT color=#0000ff
face=Arial>Also,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=488090114-01072011><FONT color=#0000ff
face=Arial>The one piece of the tutorial I have not actually duplicated in my
experiments is the use of the durable flag on queue creation and the use use of
persistent in the message creation. Would that have anything to do with
the round robin distribution of messages to queues?</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=488090114-01072011><FONT color=#0000ff
face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=488090114-01072011><FONT color=#0000ff
face=Arial>Thanks,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=488090114-01072011><FONT color=#0000ff
face=Arial> Lowell</FONT></SPAN></DIV><BR>
<BLOCKQUOTE style="MARGIN-RIGHT: 0px" dir=ltr>
<DIV dir=ltr lang=en-us class=OutlookMessageHeader align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>From:</B> Simone Busoli
[mailto:simone.busoli@gmail.com] <BR><B>Sent:</B> Thursday, June 30, 2011 5:06
PM<BR><B>To:</B> Boggs Jr., Lowell<BR><B>Cc:</B>
rabbitmq-discuss@lists.rabbitmq.com<BR><B>Subject:</B> Re: [rabbitmq-discuss]
rabbitmq-c -- multiple exectables receiving same message<BR></FONT><BR></DIV>
<DIV></DIV>
<P>Hi Lowell,</P>
<P>The second tutorial does not use a topic exchange, but even with a topic
exchange the situation would be the same. The key point here is that your
workers are reading messages from the same queue. The exchange, topic or
anything else, as soon as it has delivered a message to a queue is out of the
game. The queue receives the message because it's bound to the exchange. Then
you have two or more workers reading from the same queue, thereby receiving
each one message in a round-robin fashion.</P>
<DIV class=gmail_quote>On Jun 30, 2011 11:29 PM, <<A
href="mailto:Lowell.Boggs@emc.com" target=_blank>Lowell.Boggs@emc.com</A>>
wrote:<BR type="attribution">> I am confused by my experiments with
rabbitmq-c.<BR>> <BR>> I was trying to follow the task worker
tutorial:<BR>> <BR>> <A
href="http://www.rabbitmq.com/tutorials/tutorial-two-python.html"
target=_blank>http://www.rabbitmq.com/tutorials/tutorial-two-python.html</A><BR>>
<BR>> Of course, I'm using C interfaces not the python or Java
interfaces.<BR>> <BR>> Being a newbie it is probable that I'm doing
something wrong, but:<BR>> <BR>> The tutorial implies to me that if I
have:<BR>> <BR>> * one exchange+topic<BR>> * two worker executables
that read from it<BR>> <BR>> then<BR>> <BR>> * due to round-robin
processing, some messages will go to one executable<BR>> * other messages
will go to the other<BR>> <BR>> However, I am seeing that both
exectuables receive all the messages -- which is not at all what I
want.<BR>> <BR>> Is this supposed to work with the default version of
rabbitmq-c?<BR>> <BR>> Immediately upon logging into the channel, in the
consumers, I am setting<BR>> <BR>> basic_qos(conn, 1, 0, 1, 0);<BR>>
<BR>> Also, I am calling basic_consume like this:<BR>> <BR>>
amqp_basic_consume(conn,<BR>> 1,<BR>>
amqp_cstring_bytes(queuename),<BR>> amqp_empty_bytes,<BR>> 0,<BR>>
0,<BR>> 0,<BR>> amqp_empty_table<BR>> );<BR>> <BR>> <BR>>
The exchange that i am using is amq.direct. I have tried an empty string queue
name as well as "hello".<BR>> <BR>> I am calling basic_ack() as soon as
I receive the messages in both worker executables -- well, after I log their
reception.<BR>> <BR>> Any ideas?<BR>> <BR>> Thanks,<BR>>
Lowell<BR>> <BR>> <BR>> <BR>> <BR></DIV></BLOCKQUOTE></BODY></HTML>