[rabbitmq-discuss] pika library: pass channel to channel state-change callback?
alexis at rabbitmq.com
Wed Sep 1 17:15:38 BST 2010
sure - why not?
2010/9/1 Sigurd Høgsbro <sigurd.hogsbro at museeka.com>
> OK, so I should raise a ticket against pika on Github?
> 2010/9/1 Alexis Richardson <alexis at rabbitmq.com>
>> 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 ;-)
>> 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.
>>> rabbitmq-discuss mailing list
>>> rabbitmq-discuss at lists.rabbitmq.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rabbitmq-discuss