- COPYRIGHT AND LICENSE
Crixa::Message - A Crixa Message
This class represents a single queue. With RabbitMQ, messages are published to exchanges, which then routes the message to one or more queues. You then consume those messages from the queue.
This class provides the following methods:
This send an acknowledgement for the message on the channel that was used to receive the message.
This returns the message's body. If the message does not have any content-encoding set _or_ the message contains an encoding with the string "utf-8" (case insensitive), then the message is returned as character data. Otherwise it is returned as binary data.
There are a number of properties that can be associated with a message. This class provides reader and predicate methods for all properties of the form
$message->has_foo. None of the properties are required.
The properties supported are:
publish method in the Crixa::Exchange docs for more details.
A boolean indicating whether or not the message has already been delivered at least once. RabbitMQ guarantees that each message will be delivered at least once, and it is not uncommon for a message to be redelivered before the first consumer to receive it has had a chance to acknowledge it.
The number of messages left in the queue at the time this message was delivered.
Note that this is only set for messages which are not received via the
The routing path on which the message was received.
The exchange to which this message was published
The delivery tag for a given message. This is used when the
$message->ack() method is called.
The tag for the consumer associated with the message, if one exists.
Note that this is only set for messages which are received via the
There is no reason to call this method directly. It will be called by a Crixa::Queue object to inflate messages into objects.
Chris Prather <email@example.com>
Dave Rolsky <firstname.lastname@example.org>
This software is copyright (c) 2012 - 2015 by Chris Prather.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.