The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Net::Async::AMQP::ConnectionManager::Channel - channel proxy object

VERSION

version 2.000

METHODS

new

Instantiate. Expects at least the manager and channel named parameters.

_listener_start

Apply cleanup handler for a consumer: since we'll be releasing the channel back into the general pool, any consumer that's still active must be cancelled first.

_listener_stop

Called when a listener has stopped. This will remove the associated cleanup task.

queue_declare

Override the usual queue declaration to ensure that we attach the wrapped channel object (ourselves) rather than a raw Net::Async::AMQP::Channel instance.

confirm_mode

Don't allow this. If we want a confirm-mode-channel, it has to be assigned by passing the appropriate request to the connection manager.

Without this we run the risk of burning through channels, for example:

  • Assign a channel with no options

  • Enable confirm mode on that channel

  • Release the channel

  • Repeat

This would eventually cause all available channels to end up in the "confirm mode" available pool.

channel

Returns the underlying AMQP channel.

manager

Returns our ConnectionManager instance.

as_string

String representation of the channel object.

Takes the form "ManagedChannel[N]", where N is the ID.

DESTROY

On destruction we release the channel by informing the connection manager that we no longer require the data.

There may be some cleanup tasks required before we can release - cancelling any trailing consumers, for example. These are held in the cleanup hash.

AUTOLOAD

All other methods are proxied to the underlying Net::Async::AMQP::Channel.

AUTHOR

Tom Molesworth <TEAM@cpan.org>

LICENSE

Licensed under the same terms as Perl itself, with additional licensing terms for the MQ spec to be found in share/amqp0-9-1.extended.xml ('a worldwide, perpetual, royalty-free, nontransferable, nonexclusive license to (i) copy, display, distribute and implement the Advanced Messaging Queue Protocol ("AMQP") Specification').