on_message_outcome Event
Fires when a message's outcome is available.
Syntax
class AMQPMessageOutcomeEventParams(object): @property def session_name() -> str: ... @property def session_index() -> int: ... @property def link_name() -> str: ... @property def link_index() -> int: ... @property def message_id() -> str: ... @property def direction() -> int: ... @property def state() -> int: ... # In class AMQP: @property def on_message_outcome() -> Callable[[AMQPMessageOutcomeEventParams], None]: ... @on_message_outcome.setter def on_message_outcome(event_hook: Callable[[AMQPMessageOutcomeEventParams], None]) -> None: ...
Remarks
This event fires whenever the outcome for a message (incoming or outgoing) is available.
SessionName is the name of the session the message was transmitted on.
SessionIndex is the index of the session in the Session* properties.
LinkName is the name of the link the message was transmitted on.
LinkIndex is the index of the link in the Link* properties.
MessageId is the Id of the message; it may be empty if a message Id was not set.
Direction indicates whether this outcome was sent (0) or received (1).
State indicates the actual message outcome. Possible values are:
- 0: Accepted - The message has been processed successfully.
- 1: Rejected - The message failed to process successfully. Includes an error describing why.
- 2: Released - The message has not been (and will not be) processed.
- 3: Modified - Same as "Released", but with additional metadata for the sender.
When State is Rejected (1), the RejectErrorCondition and RejectErrorDescription configuration settings can be queried before the event handler finishes to retrieve the error information.
When State is Modified (3), the ModifiedDeliveryFailed, ModifiedMessageAnnotations, and ModifiedUndeliverableHere configuration settings can be queried before the event handler finishes to retrieve the additional metadata.