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

NAME

POE::Component::Client::AMQP::Queue - AMQP Queue object

DESCRIPTION

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.

CLASS METHODS

create (...)

    Pass two named args 'name' (optional) and 'channel'.

OBJECT METHODS

name

    Returns the queue name

channel

is_created

    Returns a boolean, indicating wether the queue has been created on the AMQP server yet or not.

do_when_created (...)

subscribe ($subref, \%opts)

    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)
    $do_ack

    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.

    $message

    Opaque payload of the content body.

    $meta

    Hashref with keys as follows:

    method_frame

    Net::AMQP::Protocol::Base delivering method object.

    header_frame

    Net::AMQP::Protocol::Base delivering ContentHeader object.

    weight, body_size

    Copied from the header_frame object.

    payload

    Same as the $message argument above.

    body_frames

    Array of all the Net::AMQP::Frame::Body frames that comprise the payload.

    queue

    The name of this queue object.

    opts

    The options used to create the Basic.Consume call (merge of default values and %opts, above)

publish ($message, \%opts)

bind (%opts)

SEE ALSO

POE::Component::Client::AMQP::Channel

COPYRIGHT

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.

AUTHOR

Eric Waters <ewaters@gmail.com>