tracking — Interfaces for high-level message tracking

This submodule provides interfaces for tracking messages to the recipient. The actual tracking is not implemented here.

New in version 0.5: This module was added in version 0.5.

See also

Method send_tracked_message()
implements tracking for messages sent through a MUC.

Interfaces

class aioxmpp.tracking.MessageTracker(token=None)[source]

This is the high-level equivalent of the StanzaToken. This structure is used by different tracking implementations.

state[source]

The current MessageState of the MessageTracker. Do not write to this attribute from user code. Writing to this attribute is intended only for the tracking implementation.

token

The StanzaToken of the message. This is usually set by the tracking implementation right when the tracker is initialised.

signal on_state_change(state)

The signal is emitted with the new state as its only argument when the state of the message tracker changes

class aioxmpp.tracking.MessageState[source]

Enumeration of possible states for MessageTracker. These states are used to inform using code about the delivery state of a message. See MessageTracker for details.

ABORTED

The message has been aborted or dropped in the StanzaStream queues. See StanzaToken and MessageTracker.token.

This is a final state.

TIMED_OUT

The tracking has timed out. Whether a timeout exists and how it is handled depends on the tracking implementation.

This is a final state.

UNKNOWN

The tracking itself got aborted and cannot make a statement about the delivery of the stanza.

This is a final state.

IN_TRANSIT

The message is still queued for sending or has been sent to the peer server without stream management.

DELIVERED_TO_SERVER

The message has been delivered to the server and the server acked the delivery using stream management.

Depending on the tracking implementation, this may be a final state.

DELIVERED_TO_RECIPIENT

The message has been delivered to the recipient. Depending on the tracking implementation, this may be a final state.

SEEN_BY_RECIPIENT

The recipient has marked the message as seen or read. This is a final state.