Thanks Marek and Tony,<br><br>Sorry to belabor the question, but I just want to make sure I understand.<br>
<br>
Say I have Consumers A and B subscribed to queue Q which has 10 messages in it.<br>
<br>
"A" would get message 1 and let's say it takes 10 seconds to process
before it ACKs. At what time would "B" get message 2: immediately, or
after 10 seconds?<br><br><br><div class="gmail_quote">On Thu, Oct 15, 2009 at 6:15 AM, majek04 <span dir="ltr"><<a href="mailto:majek04@gmail.com">majek04@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div class="h5">On Thu, Oct 15, 2009 at 01:28, Colin Z <<a href="mailto:theczintheroc2007@gmail.com">theczintheroc2007@gmail.com</a>> wrote:<br>
> If I have a queue with multiple subscribers/consumers and it also requires<br>
> acks for the messages, what is the resulting behavior?<br>
><br>
> Will the queue round robin the messages out to the subscribers regardless of<br>
> whether the messages have been ack'ed yet or not? Or will the first message<br>
> basically stall the delivery of the other messages in the queue until the<br>
> first message has been ack'ed?<br>
<br>
</div></div>By default, if you have two consumers that are reading from one<br>
queue, they will receive exactly every second message. No matter<br>
if the messages were "light" or "heavy". For example, if queue looks like:<br>
[light, heavy, light, heavy, light, heavy]<br>
The first consumer will get all the "light" messages, and the second<br>
one will get all the "heavy" ones. No matter when they will be acknowledged.<br>
See this code:<br>
<a href="http://ai.pjwstk.edu.pl/%7Emajek/dump/qos_no.py" target="_blank">http://ai.pjwstk.edu.pl/~majek/dump/qos_no.py</a><br>
<br>
<br>
Basic.qos is used to fight this limitation. Using it you can specify<br>
how many messages are allowed to be unacknowledged for a channel.<br>
Here you can see how to use it:<br>
<a href="http://ai.pjwstk.edu.pl/%7Emajek/dump/qos_yes.py" target="_blank">http://ai.pjwstk.edu.pl/~majek/dump/qos_yes.py</a><br>
<br>
Cheers!<br>
Marek Majkowski<br>
</blockquote></div><br>