Base class for received messages (kombu.message.Message and kombu.transport.virtual.base.Message).
Summary
Functions
Acknowledges the message (Message.ack) and returns the updated %Kombu.Message{state: "ACK"}.
Raises Kombu.MessageStateError if the message is not bound to a channel or is already acknowledged.
Acknowledges the message, logging any errors matching errors instead of raising.
Returns true if the message has been acknowledged, rejected, or requeued.
Deserializes the message body according to its content_type, content_encoding, and accept list.
Decodes a message body according to body_encoding ("base64" or nil / "string").
Deserializes the message body and caches the result on the returned struct.
Encodes a message body according to body_encoding ("base64" or nil / "string").
Creates a new %Kombu.Message{} from keyword options or from a raw virtual transport
message map (new(raw_message_map, channel)).
Returns the deserialized message payload (Message.payload).
Rejects the message (Message.reject) and returns %Kombu.Message{state: "REJECTED"}.
Rejects the message, logging any errors matching errors instead of raising.
Rejects and requeues the message (Message.requeue), returning %Kombu.Message{state: "REQUEUED"}.
Reraises the first error encountered during message initialization (such as decompression failure),
or invokes callback.(err) if provided.
Converts a virtual-transport message back into its serializable envelope map
(kombu.transport.virtual.base.Message.serializable).
Types
@type t() :: %Kombu.Message{ accept: [String.t()] | MapSet.t() | nil, body: binary() | term() | nil, channel: Kombu.Channel.t() | nil, content_encoding: String.t() | nil, content_type: String.t() | nil, decoded_cache: {:cached, term()} | nil, delivery_info: map(), delivery_tag: String.t() | integer() | nil, errors: [Exception.t()], headers: map(), postencode: String.t() | nil, properties: map(), raw_message: map() | nil, state: String.t() }
Functions
Acknowledges the message (Message.ack) and returns the updated %Kombu.Message{state: "ACK"}.
Raises Kombu.MessageStateError if the message is not bound to a channel or is already acknowledged.
Acknowledges the message, logging any errors matching errors instead of raising.
Returns true if the message has been acknowledged, rejected, or requeued.
Deserializes the message body according to its content_type, content_encoding, and accept list.
Decodes a message body according to body_encoding ("base64" or nil / "string").
Deserializes the message body and caches the result on the returned struct.
Encodes a message body according to body_encoding ("base64" or nil / "string").
@spec new(keyword() | map(), Kombu.Channel.t() | keyword() | nil) :: t()
Creates a new %Kombu.Message{} from keyword options or from a raw virtual transport
message map (new(raw_message_map, channel)).
Returns the deserialized message payload (Message.payload).
Rejects the message (Message.reject) and returns %Kombu.Message{state: "REJECTED"}.
Rejects the message, logging any errors matching errors instead of raising.
Rejects and requeues the message (Message.requeue), returning %Kombu.Message{state: "REQUEUED"}.
@spec reraise_error!(t(), (Exception.t() -> any()) | nil) :: :ok
Reraises the first error encountered during message initialization (such as decompression failure),
or invokes callback.(err) if provided.
Converts a virtual-transport message back into its serializable envelope map
(kombu.transport.virtual.base.Message.serializable).