<!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.&nbsp; 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>&nbsp;</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>&nbsp;&nbsp; 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, &lt;<A 
  href="mailto:Lowell.Boggs@emc.com" target=_blank>Lowell.Boggs@emc.com</A>&gt; 
  wrote:<BR type="attribution">&gt; I am confused by my experiments with 
  rabbitmq-c.<BR>&gt; <BR>&gt; I was trying to follow the task worker 
  tutorial:<BR>&gt; <BR>&gt; <A 
  href="http://www.rabbitmq.com/tutorials/tutorial-two-python.html" 
  target=_blank>http://www.rabbitmq.com/tutorials/tutorial-two-python.html</A><BR>&gt; 
  <BR>&gt; Of course, I'm using C interfaces not the python or Java 
  interfaces.<BR>&gt; <BR>&gt; Being a newbie it is probable that I'm doing 
  something wrong, but:<BR>&gt; <BR>&gt; The tutorial implies to me that if I 
  have:<BR>&gt; <BR>&gt; * one exchange+topic<BR>&gt; * two worker executables 
  that read from it<BR>&gt; <BR>&gt; then<BR>&gt; <BR>&gt; * due to round-robin 
  processing, some messages will go to one executable<BR>&gt; * other messages 
  will go to the other<BR>&gt; <BR>&gt; However, I am seeing that both 
  exectuables receive all the messages -- which is not at all what I 
  want.<BR>&gt; <BR>&gt; Is this supposed to work with the default version of 
  rabbitmq-c?<BR>&gt; <BR>&gt; Immediately upon logging into the channel, in the 
  consumers, I am setting<BR>&gt; <BR>&gt; basic_qos(conn, 1, 0, 1, 0);<BR>&gt; 
  <BR>&gt; Also, I am calling basic_consume like this:<BR>&gt; <BR>&gt; 
  amqp_basic_consume(conn,<BR>&gt; 1,<BR>&gt; 
  amqp_cstring_bytes(queuename),<BR>&gt; amqp_empty_bytes,<BR>&gt; 0,<BR>&gt; 
  0,<BR>&gt; 0,<BR>&gt; amqp_empty_table<BR>&gt; );<BR>&gt; <BR>&gt; <BR>&gt; 
  The exchange that i am using is amq.direct. I have tried an empty string queue 
  name as well as "hello".<BR>&gt; <BR>&gt; I am calling basic_ack() as soon as 
  I receive the messages in both worker executables -- well, after I log their 
  reception.<BR>&gt; <BR>&gt; Any ideas?<BR>&gt; <BR>&gt; Thanks,<BR>&gt; 
  Lowell<BR>&gt; <BR>&gt; <BR>&gt; <BR>&gt; <BR></DIV></BLOCKQUOTE></BODY></HTML>