<div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 31, 2012 at 11:52 AM, Peter Friend <span dir="ltr"><<a href="mailto:pfriend@gehrytech.com" target="_blank">pfriend@gehrytech.com</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div bgcolor="#FFFFFF"><div><div></div><blockquote type="cite"><div><div>1) Which version are you using?</div></div></blockquote></div>0.9.5. </div></blockquote><div><br></div><div>0.9.5 didn't pay as close attention to the protocol as 0.9.6 does. I'd recommend 0.9.6 at this point, especially for RPC calls from RabbitMQ.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div bgcolor="#FFFFFF">The 0.9.6 version has method signature changes that make it incompatible with most of the docs out there and I had trouble getting it to work.</div>
</blockquote><div><br></div><div>Hmm which methods changed that you're having problems with? Also docs should be up to date at <a href="https://pika.readthedocs.org/en/0.9.6/index.html" target="_blank">https://pika.readthedocs.org/</a> -- let me know if you're having any problems with them.</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div bgcolor="#FFFFFF"><div><div><blockquote type="cite">
<div>
<div>3) Did you register for a callback? Channel.add_on_cancel_callback(your_callback_method)</div>
</div></blockquote></div>I have tried when using BlockingConnection but not the asynchronous one yet. My understanding from the docs was that an exception would be thrown in consume(). Is that not correct?</div></div></blockquote>
<div><br></div><div>The problem with BlockingConnection in 0.9.5 is it doesn't pay attention to what RabbitMQ is telling it to do, unless you explicitly tell it to do so. It's likely a bug related to that causing your issue.</div>
<div><br></div><div>Here is an async consumer example that uses 0.9.6 and handles Basic.Cancel being invoked by RabbitMQ: </div><div><br></div><div><a href="https://pika.readthedocs.org/en/latest/examples/asynchronous_consumer_example.html">https://pika.readthedocs.org/en/latest/examples/asynchronous_consumer_example.html</a></div>
<div><br></div><div>In the blocking connection, you should see a pika.exceptions.ConsumerCancelled exception raised.</div><div><br></div><div>Hope this helps,</div><div><br></div><div>Gavin</div></div>
</div>