<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif; "><div>This occurs when a synchronous command is made to a channel&nbsp;� &nbsp;without specifying nowait=True � and the same command is subsequently submitted prior to the acknowledgment of the first by the server.</div><div><br></div><div>You can also specify the callback to wait for the processing of Exchange.DeclareOk as a way of handling this issue.</div><div><br></div><div>See&nbsp;<a href="https://github.com/pika/pika/issues/211">https://github.com/pika/pika/issues/211</a></div><div><br></div><div>Michael</div><div><br></div><span id="OLK_SRC_BODY_SECTION"><div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt"><span style="font-weight:bold">From: </span> Michael Klishin &lt;<a href="mailto:michael.s.klishin@gmail.com">michael.s.klishin@gmail.com</a>&gt;<br><span style="font-weight:bold">Reply-To: </span> rabbitmq &lt;<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a>&gt;<br><span style="font-weight:bold">Date: </span> Sun, 4 Nov 2012 14:03:48 -0500<br><span style="font-weight:bold">To: </span> rabbitmq &lt;<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a>&gt;<br><span style="font-weight:bold">Subject: </span> [rabbitmq-discuss] An issue in Pika 0.9.6<br></div><div><br></div>I am working on an AMQP 0.9.1 client interoperability test suite and<div>have found what looks like an issue in Pika 0.9.6.</div><div><br></div><div>The issue is the following: when consuming messages and doing something else</div><div>on the same channel (e.g. declaring an exchange), as soon as exchange.declare_ok</div><div>or similar response method arrives, Pika raises an UnexpectedMethod exception.</div><div><br></div><div><div>A piece of code I have:</div><div><a href="https://gist.github.com/2daa009ef55aac87e1ff">https://gist.github.com/2daa009ef55aac87e1ff</a></div><div><br></div><div>Stack trace:</div><div><a href="https://gist.github.com/93ad2a59b5345d0b1b7d">https://gist.github.com/93ad2a59b5345d0b1b7d</a><br></div><div><br></div><div>I understand that it makes little sense without the publisher code, which I will put on GitHub&nbsp;</div><div>some time next week, but still demonstrates the problem. Adding nowait = True makes</div><div>the exception go away because RabbitMQ will not send exchange.declare_ok back.</div><div><br></div><div>Modifying the source to use a separate channel to perform exchange declaration in the</div><div>consumer like so:</div><div><br></div><div><a href="https://gist.github.com/5175c24a4ee74465faff">https://gist.github.com/5175c24a4ee74465faff</a><br></div><div><br></div><div>also makes the exception go away.</div>-- <br>MK<br><br><a href="http://github.com/michaelklishin" target="_blank">http://github.com/michaelklishin</a><br><a href="http://twitter.com/michaelklishin" target="_blank">http://twitter.com/michaelklishin</a><br><br></div></span></body></html>