Net::Async::AMQP::RPC::Base - base class for client and server RPC handling
version 2.000
This is used internally by Net::Async::AMQP::RPC::Server and Net::Async::AMQP::RPC::Client, see those classes for details.
Returns the Net::Async::AMQP instance.
Returns a Future which resolves to the queue name once the queue has been declared.
The routing key used for publishing. Defaults to the empty string.
The exchange messages should be published to (or queues bound to).
Helper method for instantiating a Future.
Called when this instance is added to a IO::Async::Loop. Requires both an "mq" instance and a valid "exchange" name.
Returns a Future which resolves once the underlying Net::Async::AMQP connection is established.
Sets up a queue for an RPC client.
Sets up a queue for an RPC server.
Publishes a reply to an RPC message.
Expects the following:
reply_to - which queue to deliver to
correlation_id - the ID to use for this message
type - message type
payload - message content
content_type - what's in the message
content_encoding - any encoding layers
Activates a consumer. Resolves when the consumer is running.
Called when there's a message. Receives the Net::Async::AMQP::Channel followed by some named parameters:
type
payload - scalar containing the raw binary data for this message
consumer_tag - which consumer tag received this message
delivery_tag - the delivery information for "ack" in Net::Async::AMQP::Channel
routing_key - routing key used for this message
properties - any properties for the message
headers - custom headers
See "consumer" in Net::Async::AMQP::Queue for more details (including the contents of properties and headers).
properties
headers
Abstract method for message processing. Will receive the following named parameters:
The base implementation here will raise an exception. Override this in your subclass to do something more useful.
Returns a Future which resolves to the Net::Async::AMQP::Channel used for the consumer.
Returns a Future which resolves to the Net::Async::AMQP::Channel used for the publisher.
Returns a Future which resolves when the underlying MQ connection is ready for use.
add_child, adopt_future, can_event, children, configure_unknown, debug_printf, get_loop, invoke_error, invoke_event, loop, make_event_cb, maybe_invoke_event, maybe_make_event_cb, new, notifier_name, parent, remove_child, remove_from_parent
Tom Molesworth <TEAM@cpan.org>
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').
share/amqp0-9-1.extended.xml
To install Net::Async::AMQP, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::Async::AMQP
CPAN shell
perl -MCPAN -e shell install Net::Async::AMQP
For more information on module installation, please visit the detailed CPAN module installation guide.