[rabbitmq-discuss] consumer cancel notify support in pika

Gavin M. Roy gmr at meetme.com
Wed Oct 31 22:08:59 GMT 2012


On Wed, Oct 31, 2012 at 5:03 PM, Peter Friend <pfriend at gehrytech.com> wrote:

> Here are the issues I've had so far with 0.9.6:****
>
> ** 1. exchange_declare() type arg is now exchange_type
>

Gotcha, I had moved way from the auto-assignment of reserved keywords.
type, in this case is a reserved word in Python, using it would reassign
the type function to the value passed in. While this does break with 0.9.5,
it does seem like it's the right behavior. Thoughts?

> ****
>
> 2. Ran into problems with RPC type calls. In 0.9.5 the docs for channel
> has:****
>
>                queue_declare(self, callback=None, ticket=0, queue='',
> passive=False, durable=False, exclusive=False, auto_delete=False,
> nowait=False, arguments={})
>

ticket has been removed from all the calls since it is deprecated in the
protocol and not used by anything. I can see how the behavioral change can
cause an issue if you were putting it in by default.


> ****
>
>    and in 0.9.6:****
>
>                queue_declare(self, callback, queue, passive=False,
> durable=False, exclusive=False, auto_delete=False, nowait=False,
> arguments=None)
>
****
>
>    The callback and queue args are required now so a line that used to be:
>
>                result = channel.queue_declare(exclusive=True,
> auto_delete=True) should presumably now be:****
>
>                result = channel.queue_declare(callback=None, queue='',
> exclusive=True, auto_delete=True)****
>
>    However that results in this error:****
>
>                TypeError: queue_declare() got an unexpected keyword
> argument 'callback'
>
Yeah callbacks in BlockingConnection were removed for synchronous commands.

>    This is confusing if you are reading the docs for channel, and is a
> behavior change from 0.9.5.
>
Fair enough, in the async, I see the callback should be None, but queue
should not. Any suggestions for the right behavior here?  I could throw an
exception for passing in an empty queue name.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20121031/94dc7235/attachment.htm>


More information about the rabbitmq-discuss mailing list