[rabbitmq-discuss] An issue in Pika 0.9.6

Michael Klishin michael.s.klishin at gmail.com
Sun Nov 4 19:03:48 GMT 2012


I am working on an AMQP 0.9.1 client interoperability test suite and
have found what looks like an issue in Pika 0.9.6.

The issue is the following: when consuming messages and doing something else
on the same channel (e.g. declaring an exchange), as soon as
exchange.declare_ok
or similar response method arrives, Pika raises an UnexpectedMethod
exception.

A piece of code I have:
https://gist.github.com/2daa009ef55aac87e1ff

Stack trace:
https://gist.github.com/93ad2a59b5345d0b1b7d

I understand that it makes little sense without the publisher code, which I
will put on GitHub
some time next week, but still demonstrates the problem. Adding nowait =
True makes
the exception go away because RabbitMQ will not send exchange.declare_ok
back.

Modifying the source to use a separate channel to perform exchange
declaration in the
consumer like so:

https://gist.github.com/5175c24a4ee74465faff

also makes the exception go away.
-- 
MK

http://github.com/michaelklishin
http://twitter.com/michaelklishin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20121104/47f68268/attachment.htm>


More information about the rabbitmq-discuss mailing list