POE::Component::Client::AMQP::Queue - AMQP Queue object
Create using the POE::Component::Client::AMQP::Channel objects' queue() command. Calling queue() also retrieves previously created Queue objects. Alternatively, you can use the create() class method below to create it directly, but doing so will not send the Queue.Declare call to the AMQP server.
queue()
create()
Pass two named args 'name' (optional) and 'channel'.
Returns the queue name
Returns the POE::Component::Client::AMQP::Channel parent object.
Returns a boolean, indicating wether the queue has been created on the AMQP server yet or not.
See POE::Component::Client::AMQP::do_when_startup(); similar behavior.
Sends a Net::AMQP::Protocol::Basic::Consume frame to the server, storing the $subref as a callback function for when content is received.
Optionally provide %opts which will override defaults for the Basic.Consume call.
The argument signature of the callback is like so:
my $do_ack = $subref->($message, $meta)
If in the %opts hash you choose 'no_ack => 0', then messages have to be explicitly ack'ed once handled. If your callback returns true in this condition, an ack message will automatically be sent for you.
Opaque payload of the content body.
Hashref with keys as follows:
Net::AMQP::Protocol::Base delivering method object.
Net::AMQP::Protocol::Base delivering ContentHeader object.
Copied from the header_frame object.
Same as the $message argument above.
Array of all the Net::AMQP::Frame::Body frames that comprise the payload.
The name of this queue object.
The options used to create the Basic.Consume call (merge of default values and %opts, above)
Sends a message to the queue. In other words, sends a Net::AMQP::Protocol::Basic::Publish followed by a Net::AMQP::Protocol::Basic::ContentHeader and Net::AMQP::Frame::Body containing the body of the message.
Optionally pass %opts, which can override any option in the Net::AMQP::Protocol::Basic::Publish ('ticket', 'exchange', 'routing_key', 'mandatory', 'immediate'), Net::AMQP::Frame::Header ('weight') or Net::AMQP::Protocol::Basic::ContentHeader ('content_type', 'content_encoding', 'headers', 'delivery_mode', 'priority', 'correlation_id', 'reply_to', 'expiration', 'message_id', 'timestamp', 'type', 'user_id', 'app_id', 'cluster_id') objects. See the related documentation for an explaination of each.
Shortcut to send a Queue.Bind call with this queue name. Pass the same args you'd pass to a Net::AMQP::Protocol::Queue::Bind object creation.
POE::Component::Client::AMQP::Channel
Copyright (c) 2009 Eric Waters and XMission LLC (http://www.xmission.com/). All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
Eric Waters <ewaters@gmail.com>
To install POE::Component::Client::AMQP, copy and paste the appropriate command in to your terminal.
cpanm
cpanm POE::Component::Client::AMQP
CPAN shell
perl -MCPAN -e shell install POE::Component::Client::AMQP
For more information on module installation, please visit the detailed CPAN module installation guide.