<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">&lt;<a href="mailto:tonyg@lshift.net">tonyg@lshift.net</a>&gt;</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>
&gt; Regarding the blocking &quot;GET&quot; commands, I read about Kesterl (in the link<br>
&gt; I gave below) and thought its an interesting approach to make pulling a<br>
&gt; bit more efficient instead of sending the &quot;puller&quot; 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>
 �--&gt; BASIC.QOS{ prefetch_count = 1 }<br>
 �--&gt; BASIC.CONSUME<br>
 �&lt;-- BASIC.CONSUME-OK<br>
 �... wait for a message to arrive ...<br>
 �&lt;-- BASIC.DELIVER<br>
 �--&gt; BASIC.CANCEL<br>
 �&lt;-- BASIC.CANCEL-OK<br>
 �... processing of message ...<br>
 �--&gt; BASIC.ACK<br>
<br>
versus<br>
<br>
 �--&gt; BASIC.QOS{ prefetch_count = 1 }<br>
 �--&gt; BASIC.CONSUME<br>
 �&lt;-- BASIC.CONSUME-OK<br>
 �... wait for a message to arrive ...<br>
 �&lt;-- BASIC.DELIVER<br>
 �... processing of message ...<br>
 �--&gt; BASIC.ACK<br>
 �... wait for a message to arrive ...<br>
 �&lt;-- BASIC.DELIVER<br>
 �... processing of message ...<br>
 �--&gt; 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>