<div dir="ltr">Thanks Tony.<br><br>This looks like an interesting semantics for this.<br><br>Eran<br><br><div class="gmail_quote">On Tue, Mar 17, 2009 at 1:11 PM, Tony Garnock-Jones <span dir="ltr"><<a href="mailto:tonyg@lshift.net">tonyg@lshift.net</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 class="im">Eran Sandler wrote:<br>
> Regarding the blocking "GET" commands, I read about Kesterl (in the link<br>
> I gave below) and thought its an interesting approach to make pulling a<br>
> bit more efficient instead of sending the "puller" back to a short sleep.<br>
<br>
</div>Another approach is to set the prefetch window to 1, and start a<br>
consumer. If you really did only want a single message, you can cancel<br>
the consumer before acking the message. Otherwise, when you ack it, the<br>
server will send you the next waiting message if there is one.<br>
<br>
--> BASIC.QOS{ prefetch_count = 1 }<br>
--> BASIC.CONSUME<br>
<-- BASIC.CONSUME-OK<br>
... wait for a message to arrive ...<br>
<-- BASIC.DELIVER<br>
--> BASIC.CANCEL<br>
<-- BASIC.CANCEL-OK<br>
... processing of message ...<br>
--> BASIC.ACK<br>
<br>
versus<br>
<br>
--> BASIC.QOS{ prefetch_count = 1 }<br>
--> BASIC.CONSUME<br>
<-- BASIC.CONSUME-OK<br>
... wait for a message to arrive ...<br>
<-- BASIC.DELIVER<br>
... processing of message ...<br>
--> BASIC.ACK<br>
... wait for a message to arrive ...<br>
<-- BASIC.DELIVER<br>
... processing of message ...<br>
--> BASIC.ACK<br>
...<br>
<br>
Regards,<br>
Tony<br>
<font color="#888888">--<br>
[][][] Tony Garnock-Jones | Mob: +44 (0)7905 974 211<br>
[][] LShift Ltd | Tel: +44 (0)20 7729 7060<br>
[] [] <a href="http://www.lshift.net/" target="_blank">http://www.lshift.net/</a> | Email: <a href="mailto:tonyg@lshift.net">tonyg@lshift.net</a><br>
</font></blockquote></div><br></div>