AnyEvent-RabbitMQ
view release on metacpan or search on metacpan
lib/AnyEvent/RabbitMQ/Channel.pm view on Meta::CPAN
=item durable
Default 0
=item auto_delete
Default 0
=item internal
Default 0
=item exchange
The name of the exchange
=back
=head2 bind_exchange
Binds an exchange to another exchange, with a routing key.
Arguments:
=over
=item source
The name of the source exchange to bind
=item destination
The name of the destination exchange to bind
=item routing_key
The routing key to bind with
=back
=head2 unbind_exchange
=head2 delete_exchange
=head2 declare_queue
Declare a queue (create it if it doesn't exist yet) for publishing messages
to on the server.
my $done = AnyEvent->condvar;
$channel->declare_queue(
exchange => $queue_exchange,
queue => $queueName,
durable => 0,
auto_delete => 1,
passive => 0,
arguments => { 'x-expires' => 0, },
on_success => sub { $done->send; },
on_failure => sub {
say "Unable to create queue $queueName";
$done->send;
},
);
$done->recv;
Arguments:
=over
=item queue
Name of the queue to be declared. If the queue name is the empty string,
RabbitMQ will create a unique name for the queue. This is useful for
temporary/private reply queues.
=item on_success
Callback that is called when the queue was declared successfully. The argument
to the callback is of type L<Net::AMQP::Frame::Method>. To get the name of the
Queue (if you declared it with an empty name), you can say
on_success => sub {
my $method = shift;
my $name = $method->method_frame->queue;
};
=item on_failure
Callback that is called when the declaration of the queue has failed.
=item auto_delete
0 or 1, default 0
=item passive
0 or 1, default 0
=item durable
0 or 1, default 0
=item exclusive
0 or 1, default 0
=item no_ack
0 or 1, default 1
=item ticket
default 0
=for comment
XXX Is "exchange" a valid parameter?
=item arguments
C<arguments> is a hashref of additional parameters which RabbitMQ extensions
( run in 1.531 second using v1.01-cache-2.11-cpan-483215c6ad5 )