[rabbitmq-discuss] pika library: pass channel to channel state-change callback?

Sigurd Høgsbro sigurd.hogsbro at museeka.com
Wed Sep 1 17:14:05 BST 2010

OK, so I should raise a ticket against pika on Github?


2010/9/1 Alexis Richardson <alexis at rabbitmq.com>

> Sigurd
> It's fine and welcome to discuss AMQP clients on this list.  Thank-you for
> the email.
> I'd stick this on Github where people can see it ;-)
> alexis
> 2010/9/1 Sigurd Høgsbro <sigurd.hogsbro at museeka.com>
>> Sorry if discussion on pika is out of scope of this mailing-list, but I
>> thought it preferential to mailing Tony directly.
>> I'm use pika's asyncore programming model, and find it an excellent model
>> for dealing with connection & channel setup/teardown.
>> I have an issue on the channel state callback, which currently passes the
>> ChannelHandler() as a parameter to the callback. As I understand it, the
>> ChannelHandler() is not an object intended for client app usage, and does
>> not that I can see provide any methods useful to the client app.
>> As it works now, I cannot create a function to allocate a channel (using
>> pika.AsyncoreConnection.channel()) and setup the callbacks (using
>> channel.addStateChangeHandler()), as the channel state callback is called
>> before I can store the reference to the returned Channel() object in my
>> containing object.
>> By replacing the ChannelHandler() object with the Channel() reference
>> instead then the obvious channel operations (declaring of queues etc) could
>> use this parameter and avoid the catch-22 issue.
>> If there is general agreement to this change I'm happy to commit the
>> required changes to Github.
>> Cheers,
>> Sigurd
>> _______________________________________________
>> rabbitmq-discuss mailing list
>> rabbitmq-discuss at lists.rabbitmq.com
>> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20100901/98b95e3c/attachment.htm>

More information about the rabbitmq-discuss mailing list