<div>
                    I have not had time to put in the fix yet, but I am aware of the problem and hope to be able to get to it this weekend.
                </div><div><br></div><div>Gavin</div>
                <div></div>
                 
                <p style="color: #A0A0A8;">On Thursday, February 9, 2012 at 10:13 AM, David Robins wrote:</p>
                <blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-left:0px;padding-left:10px;">
                    <span><div><div>

<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 11 (filtered medium)">



<div>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial">I'm using Pika and Python (3.2.2) to access RabbitMQ (2.6.1) queues, on Linux (kernel 3.0.6); specifically, I have some code that creates a blocking connection,
 binds a channel to a couple of queues, calls<o:p></o:p></span></font></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial">basic_consume on the channel for each queue with no_ack=False, and then start_consuming.<o:p></o:p></span></font></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial"><o:p>&nbsp;</o:p></span></font></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial">It drains a (random - in recent runs I saw 14, 4, then 9) number of messages already in the queue under basic_consume, but then throws the following exception:<o:p></o:p></span></font></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial"><o:p>&nbsp;</o:p></span></font></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Traceback (most recent call last):<o:p></o:p></span></font></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; File "./ep_test", line 62, in &lt;module&gt;<o:p></o:p></span></font></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; et.track(args.drain)<o:p></o:p></span></font></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; File "./ep_test", line 41, in track<o:p></o:p></span></font></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.q2.consume(callback, auto_ack=False)<o:p></o:p></span></font></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; File "/home/dbrobins/code/utils/tq/broker.py", line 45, in consume<o:p></o:p></span></font></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.brk.chan.basic_consume(thunk, queue=self.qname, no_ack=auto_ack)<o:p></o:p></span></font></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; File "/usr/lib64/python3.2/site-packages/pika-0.9.5-py3.2.egg/pika/channel.py", line 368, in basic_consume<o:p></o:p></span></font></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [spec.Basic.ConsumeOk])<o:p></o:p></span></font></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; File "/usr/lib64/python3.2/site-packages/pika-0.9.5-py3.2.egg/pika/adapters/blocking_connection.py", line 224, in rpc<o:p></o:p></span></font></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; frame = self._frames[reply]<o:p></o:p></span></font></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; KeyError: 'Basic.ConsumeOk'<o:p></o:p></span></font></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial"><o:p>&nbsp;</o:p></span></font></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial">Am I doing something wrong in thinking I can ack a message in this state? It doesn't throw an exception with no_ack=True. If so, what? Or is it a bug in the
 pika module or a problem with RabbitMQ?<o:p></o:p></span></font></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial"><o:p>&nbsp;</o:p></span></font></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial">I've done a little debugging and it's possible I'm getting two Basic.ConsumeOk frames - if so, would that be a bug in RabbitMQ or does the client need to expect
 this? Is there a way to get verbose debug<o:p></o:p></span></font></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial">output from RabbitMQ? - searches indicate no, except perhaps to watch it with an independent network tracing tool? Thanks for any help.<o:p></o:p></span></font></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial"><o:p>&nbsp;</o:p></span></font></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial">…<o:p></o:p></span></font></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial"><o:p>&nbsp;</o:p></span></font></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial">This is likely an instance of issue #70 on GitHub (<a href="https://github.com/pika/pika/issues/70">https://github.com/pika/pika/issues/70</a>) which says “Pending
 Fix” – does that mean that a fix is available but unreleased, or that there is no fix yet?<o:p></o:p></span></font></p>
</div>


</div><div><div>_______________________________________________</div><div>rabbitmq-discuss mailing list</div><div><a href="mailto:rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a></div><div><a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss">https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a></div></div></div></span>
                 
                 
                 
                 
                </blockquote>
                 
                <div>
                    <br>
                </div>