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 </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>