[rabbitmq-discuss] An issue in Pika 0.9.6

Laing, Michael P. Michael.Laing at nytimes.com
Sun Nov 4 20:42:10 GMT 2012


This occurs when a synchronous command is made to a channel –  without specifying nowait=True – and the same command is subsequently submitted prior to the acknowledgment of the first by the server.

You can also specify the callback to wait for the processing of Exchange.DeclareOk as a way of handling this issue.

See https://github.com/pika/pika/issues/211

Michael

From: Michael Klishin <michael.s.klishin at gmail.com<mailto:michael.s.klishin at gmail.com>>
Reply-To: rabbitmq <rabbitmq-discuss at lists.rabbitmq.com<mailto:rabbitmq-discuss at lists.rabbitmq.com>>
Date: Sun, 4 Nov 2012 14:03:48 -0500
To: rabbitmq <rabbitmq-discuss at lists.rabbitmq.com<mailto:rabbitmq-discuss at lists.rabbitmq.com>>
Subject: [rabbitmq-discuss] An issue in Pika 0.9.6

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/af79eea3/attachment.htm>


More information about the rabbitmq-discuss mailing list