<!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=400224413-01072011><FONT color=#0000ff
face=Arial>HI Simon -- thanks for trying to help!</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=400224413-01072011><FONT color=#0000ff
face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=400224413-01072011><FONT color=#0000ff
face=Arial>The two executables are not in fact receiving the messages in a
<EM>round-robin</EM> fashion. They are both receiving <U>all</U> of the
messages. </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=400224413-01072011><FONT color=#0000ff
face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=400224413-01072011><FONT color=#0000ff
face=Arial>I send 4000 messages and both executables receive all 4000 in
sequence. It was my understanding that the point of the tutorial was to
demonstrate a round robin delivery of 1/2 of the messages to each consumer so as
to accomplish load balancing. The examples in the tutorial page show that
of the 5 messages sent as a test, 3 went to one python consumer task and the 2
going to the other.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=400224413-01072011><FONT color=#0000ff
face=Arial></FONT></SPAN><SPAN class=400224413-01072011><FONT color=#0000ff
face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=400224413-01072011><FONT color=#0000ff
face=Arial>Our use of the rabbit-mq entirely depends on this load balancing
feature. If I can't get this to work like the tutorial, we need to pursue
a different messaging solution. I guess I'll have to copy the python
examples out of the tutorial and see if the tutorial actually works -- maybe the
actual python source will tell me what I' might be doing
wrong.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=400224413-01072011><FONT color=#0000ff
face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=400224413-01072011><FONT color=#0000ff
face=Arial>Thanks,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=400224413-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>