API Overview

An overview of the model

Messages are transferred between connected peers over ‘links’. At the sending peer the link is called a sender. At the receiving peer it is called a receiver. Messages are sent by senders and received by receivers. Links may have named ‘source’ and ‘target’ addresses (for example to identify the queue from which message were to be received or to which they were to be sent).

Links are established over sessions. Sessions are established over connections. Connections are (generally) established between two uniquely identified containers. Though a connection can have multiple sessions, often this is not needed. The container API allows you to ignore sessions unless you actually require them.

The sending of a message over a link is called a delivery. The message is the content sent, including all meta-data such as headers and annotations. The delivery is the protocol exchange associated with the transfer of that content.

To indicate that a delivery is complete, either the sender or the receiver ‘settles’ it. When the other side learns that it has been settled, they will no longer communicate about that delivery. The receiver can also indicate whether they accept or reject the message.

Three different delivery levels or ‘guarantees’ can be achieved: at-most-once, at-least-once or exactly-once. See Delivery guarantees for more detail.

A summary of the most commonly used classes and members

A brief summary of some of the key classes follows.

The Container class is a convenient entry point into the API, allowing connections and links to be established. Applications are structured as one or more event handlers. Handlers can be set at Container, Connection, or Link scope. Messages are sent by establishing an appropriate sender and invoking its send() method. This is typically done when the sender is sendable, a condition indicated by the on_sendable() event, to avoid excessive build up of messages. Messages can be received by establishing an appropriate receiver and handling the on_message() event.

class proton.reactor.Container(*handlers, **kwargs)[source]

Bases: proton._reactor.Reactor

A representation of the AMQP concept of a ‘container’, which loosely speaking is something that establishes links to or from another container, over which messages are transfered. This is an extension to the Reactor class that adds convenience methods for creating connections and sender- or receiver- links.

container_id

The identifier used to identify this container in any connections it establishes. Container names should be unique. By default a UUID will be used.

The connect() method returns an instance of Connection, the create_receiver() method returns an instance of Receiver and the create_sender() method returns an instance of Sender.

connect(url=None, urls=None, address=None, handler=None, reconnect=None, heartbeat=None, ssl_domain=None, **kwargs)[source]

Initiates the establishment of an AMQP connection.

An optional JSON configuration file may be used to specify some connection parameters. If present, these will override some of those given in this call (see note below). Some connection parameters (for SSL/TLS) can only be provided through this file. The configuration file is located by searching for it as follows:

  1. The location set in the environment variable MESSAGING_CONNECT_FILE

  2. .connect.json

  3. ~/.config/messaging/connect.json

  4. /etc/messaging/connect.json

To use SSL/TLS for encryption (when an amqps URL scheme is used), the above configuration file must contain a tls submap containing the following configuration entries (See proton.SSLDomain for details):

  • ca: Path to a database of trusted CAs that the server will advertise.

  • cert: Path to a file/database containing the identifying certificate.

  • key: An optional key to access the identifying certificate.

  • verify: If True, verify the peer name (proton.SSLDomain.VERIFY_PEER_NAME) and certificate using the ca above.

Parameters
  • url (str) – URL string of process to connect to

  • urls ([str, str, ...]) – list of URL strings of process to try to connect to

  • reconnect (Backoff or bool) – Reconnect is enabled by default. You can pass in an instance of Backoff to control reconnect behavior. A value of False will prevent the library from automatically trying to reconnect if the underlying socket is disconnected before the connection has been closed.

  • heartbeat (float) – A value in seconds indicating the desired frequency of heartbeats used to test the underlying socket is alive.

  • ssl_domain (proton.SSLDomain) – SSL configuration.

  • handler (Any child of proton.Events.Handler) – a connection scoped handler that will be called to process any events in the scope of this connection or its child links.

  • kwargs

    • sasl_enabled (bool), which determines whether a sasl layer is used for the connection.

    • allowed_mechs (str), an optional string specifying the SASL mechanisms allowed for this connection; the value is a space-separated list of mechanism names; the mechanisms allowed by default are determined by your SASL library and system configuration, with two exceptions: GSSAPI and GSS-SPNEGO are disabled by default; to enable them, you must explicitly add them using this option; clients must set the allowed mechanisms before the outgoing connection is attempted; servers must set them before the listening connection is setup.

    • allow_insecure_mechs (bool), a flag indicating whether insecure mechanisms, such as PLAIN over a non-encrypted socket, are allowed.

    • password (str), the authentication secret. Ignored without user kwarg also being present.

    • user (str), the user to authenticate.

    • virtual_host (str), the hostname to set in the Open performative used by peer to determine the correct back-end service for the client; if virtual_host is not supplied the host field from the URL is used instead.

    • offered_capabilities, a list of capabilities being offered to the peer. The list must contain symbols (or strings, which will be converted to symbols).

    • desired_capabilities, a list of capabilities desired from the peer. The list must contain symbols (or strings, which will be converted to symbols).

    • properties, a list of connection properties. This must be a map with symbol keys (or string keys, which will be converted to symbol keys).

    • sni (str), a hostname to use with SSL/TLS Server Name Indication (SNI)

    • max_frame_size (int), the maximum allowable TCP packet size between the peers.

Returns

A new connection object.

Return type

proton.Connection

Note

Only one of url or urls should be specified.

Note

The following kwargs will be overridden by the values found in the JSON configuration file (if they exist there):

  • password

  • user

and the following kwargs will be overridden by the values found in the sasl sub-map of the above configuration file (if they exist there):

  • sasl_enabled

  • allowed_mechs

create_receiver(context, source=None, target=None, name=None, dynamic=False, handler=None, options=None)[source]

Initiates the establishment of a link over which messages can be received (aka a subscription).

There are two patterns of use:

(1) A connection can be passed as the first argument, in which case the link is established on that connection. In this case the source address can be specified as the second argument (or as a keyword argument). The target address can also be specified if desired.

(2) Alternatively a URL can be passed as the first argument. In this case a new connection will be established on which the link will be attached. If a path is specified and the source is not, then the path of the URL is used as the target address.

The name of the link may be specified if desired, otherwise a unique name will be generated.

Various LinkOption s can be specified to further control the attachment.

Parameters
  • context (proton.Connection or str) – A connection object or a URL.

  • source (str) – Address of source node.

  • target (str) – Address of target node.

  • name (str) – Receiver name.

  • dynamic (bool) – If True, indicates dynamic creation of the receiver.

  • handler (Any child class of proton.Handler) – Event handler for this receiver.

  • options (ReceiverOption or [ReceiverOption, ReceiverOption, …]) – A single option, or a list of receiver options

Returns

New receiver instance.

Return type

proton.Receiver

create_sender(context, target=None, source=None, name=None, handler=None, tags=None, options=None)[source]

Initiates the establishment of a link over which messages can be sent.

There are two patterns of use:

  1. A connection can be passed as the first argument, in which case the link is established on that connection. In this case the target address can be specified as the second argument (or as a keyword argument). The source address can also be specified if desired.

  2. Alternatively a URL can be passed as the first argument. In this case a new connection will be established on which the link will be attached. If a path is specified and the target is not, then the path of the URL is used as the target address.

The name of the link may be specified if desired, otherwise a unique name will be generated.

Various LinkOption s can be specified to further control the attachment.

Parameters
  • context (proton.Connection or str) – A connection object or a URL.

  • target (str) – Address of target node.

  • source (str) – Address of source node.

  • name (str) – Sender name.

  • handler (Any child class of proton.Handler) – Event handler for this sender.

  • tags (function pointer) – Function to generate tags for this sender of the form def simple_tags(): and returns a bytes type

  • options (SenderOption or [SenderOption, SenderOption, …]) – A single option, or a list of sender options

Returns

New sender instance.

Return type

proton.Sender

run()

Start the processing of events and messages for this container.

schedule(delay, handler)

Schedule a task to run on this container after a given delay, and using the supplied handler.

Parameters
  • delay

  • handler

class proton.Connection(impl=<function pn_connection>)[source]

A representation of an AMQP connection.

close()[source]

Closes the connection.

In more detail, this moves the local state of the connection to the CLOSED state and triggers a close frame to be sent to the peer. A connection is fully closed once both peers have closed it.

property container

The container name for this connection object.

Type

str

property hostname

Set the name of the host (either fully qualified or relative) to which this connection is connecting to. This information may be used by the remote peer to determine the correct back-end service to connect the client to. This value will be sent in the Open performative, and will be used by SSL and SASL layers to identify the peer.

Type

str

open()[source]

Opens the connection.

In more detail, this moves the local state of the connection to the ACTIVE state and triggers an open frame to be sent to the peer. A connection is fully active once both peers have opened it.

property remote_container

The container identifier specified by the remote peer for this connection.

This will return None until the :const:’REMOTE_ACTIVE` state is reached. See Endpoint for more details on endpoint state.

Any (non None) name returned by this operation will be valid until the connection object is unbound from a transport or freed, whichever happens sooner.

Type

str

property remote_desired_capabilities

The capabilities desired by the remote peer for this connection.

This operation will return a Data object that is valid until the connection object is freed. This Data object will be empty until the remote connection is opened as indicated by the REMOTE_ACTIVE flag.

Type

Data

property remote_hostname

The hostname specified by the remote peer for this connection.

This will return None until the REMOTE_ACTIVE state is reached. See Endpoint for more details on endpoint state.

Any (non None) name returned by this operation will be valid until the connection object is unbound from a transport or freed, whichever happens sooner.

Type

str

property remote_offered_capabilities

The capabilities offered by the remote peer for this connection.

This operation will return a Data object that is valid until the connection object is freed. This Data object will be empty until the remote connection is opened as indicated by the REMOTE_ACTIVE flag.

Type

Data

property remote_properties

The properties specified by the remote peer for this connection.

This operation will return a Data object that is valid until the connection object is freed. This Data object will be empty until the remote connection is opened as indicated by the REMOTE_ACTIVE flag.

Type

Data

session()[source]

Returns a new session on this connection.

Returns

New session

Return type

Session

Raises

SessionException

property state

The state of the connection as a bit field. The state has a local and a remote component. Each of these can be in one of three states: UNINIT, ACTIVE or CLOSED. These can be tested by masking against LOCAL_UNINIT, LOCAL_ACTIVE, LOCAL_CLOSED, REMOTE_UNINIT, REMOTE_ACTIVE and REMOTE_CLOSED.

class proton.Receiver(impl)[source]

Bases: proton._endpoints.Link

A link over which messages are received.

drain(n)[source]

Grant credit for incoming deliveries on this receiver, and set drain mode to true.

Use drain_mode to set the drain mode explicitly.

Parameters

n (int) – The amount by which to increment the link credit

draining()[source]

Check if a link is currently draining. A link is defined to be draining when drain mode is set to True, and the sender still has excess credit.

Returns

True if the link is currently draining, False otherwise.

Return type

bool

flow(n)[source]

Increases the credit issued to the remote sender by the specified number of messages.

Parameters

n (int) – The credit to be issued to the remote sender.

recv(limit)[source]

Receive message data for the current delivery on this receiver.

Note

The link API can be used to stream large messages across the network, so just because there is no data to read does not imply the message is complete. To ensure the entirety of the message data has been read, either invoke recv() until None is returned.

Parameters

limit (int) – the max data size to receive of this message

Returns

The received message data, or None if the message has been completely received.

Return type

binary or None

Raise
class proton.Sender(impl)[source]

Bases: proton._endpoints.Link

A link over which messages are sent.

offered(n)[source]

Signal the availability of deliveries for this Sender.

Parameters

n (int) – Credit the number of deliveries potentially available for transfer.

send(obj, tag=None)[source]

A convenience method to send objects as message content.

Send specified object over this sender; the object is expected to have a send() method on it that takes the sender and an optional tag as arguments.

Where the object is a Message, this will send the message over this link, creating a new delivery for the purpose.

class proton.Link(impl)[source]

A representation of an AMQP link (a unidirectional channel for transferring messages), of which there are two concrete implementations, Sender and Receiver.

The source(), target(), remote_source() and remote_target() methods all return an instance of Terminus.

property connection

The connection on which this link was attached.

Type

Connection

property credit

The amount of outstanding credit on this link.

Links use a credit based flow control scheme. Every receiver maintains a credit balance that corresponds to the number of deliveries that the receiver can accept at any given moment. As more capacity becomes available at the receiver (see Receiver.flow()), it adds credit to this balance and communicates the new balance to the sender. Whenever a delivery is sent/received, the credit balance maintained by the link is decremented by one. Once the credit balance at the sender reaches zero, the sender must pause sending until more credit is obtained from the receiver.

Note

A sending link may still be used to send deliveries even if credit reaches zero, however those deliveries will end up being buffered by the link until enough credit is obtained from the receiver to send them over the wire. In this case the balance reported by credit will go negative.

Type

int

property is_receiver

True if this link is a receiver, False otherwise.

Type

bool

property is_sender

True if this link is a sender, False otherwise.

Type

bool

property name

The name of the link.

Type

str

property queued

The number of queued deliveries for a link.

Links may queue deliveries for a number of reasons, for example there may be insufficient credit to send them to the receiver (see credit()), or they simply may not have yet had a chance to be written to the wire. This operation will return the number of queued deliveries on a link.

Type

int

property remote_source

The source of the link as described by the remote peer. The returned object is valid until the link is freed. The remote Terminus object will be empty until the link is remotely opened as indicated by the REMOTE_ACTIVE flag.

Type

Terminus

property remote_target

The target of the link as described by the remote peer. The returned object is valid until the link is freed. The remote Terminus object will be empty until the link is remotely opened as indicated by the REMOTE_ACTIVE flag.

Type

Terminus

property session

The parent session for this link.

Type

Session

property source

The source of the link as described by the local peer. The returned object is valid until the link is freed.

Type

Terminus

property state

The state of the link as a bit field. The state has a local and a remote component. Each of these can be in one of three states: UNINIT, ACTIVE or CLOSED. These can be tested by masking against LOCAL_UNINIT, LOCAL_ACTIVE, LOCAL_CLOSED, REMOTE_UNINIT, REMOTE_ACTIVE and REMOTE_CLOSED.

Type

int

property target

The target of the link as described by the local peer. The returned object is valid until the link is freed.

Type

Terminus

class proton.Delivery(impl)[source]

Tracks and/or records the delivery of a message over a link.

property connection

The Connection over which the delivery was sent or received.

Type

Connection

property link

The Link on which the delivery was sent or received.

Type

Link

property local_state

A string representation of the local state of the delivery.

Type

str

property partial

True for an incoming delivery if not all the data is yet available, False otherwise.

Type

bool

property readable

True for an incoming delivery that has data to read, False otherwise..

Type

bool

property remote_state

A string representation of the state of the delivery as indicated by the remote peer.

Type

str

property session

The Session over which the delivery was sent or received.

Type

Session

settle()[source]

Settles the delivery locally. This indicates the application considers the delivery complete and does not wish to receive any further events about it. Every delivery should be settled locally.

property settled

True if the delivery has been settled by the remote peer, False otherwise.

Type

bool

update(state)[source]

Set the local state of the delivery e.g. ACCEPTED, REJECTED, RELEASED.

Parameters

state (int) – State of delivery

property writable

True for an outgoing delivery to which data can now be written, False otherwise..

Type

bool

class proton.handlers.MessagingHandler(prefetch=10, auto_accept=True, auto_settle=True, peer_close_is_error=False)[source]

A general purpose handler that makes the proton-c events somewhat simpler to deal with and/or avoids repetitive tasks for common use cases.

Parameters
  • prefetch (int) – Initial flow credit for receiving messages, defaults to 10.

  • auto_accept (bool) – If True, accept all messages (default). Otherwise messages must be individually accepted or rejected.

  • auto_settle (bool) – If True, settle all messages (default). Otherwise messages must be explicitly settled.

  • peer_close_is_error (bool) – If True, a peer endpoint closing will be treated as an error with an error callback. Otherwise (default), the normal callbacks for the closing will occur.

accept(delivery)

Accepts a received message.

Note

This method cannot currently be used in combination with transactions. See proton.reactor.Transaction for transactional methods.

Parameters

delivery (proton.Delivery) – The message delivery tracking object

on_accepted(event)[source]

Called when the remote peer accepts an outgoing message.

Parameters

event (proton.Event) – The underlying event object. Use this to obtain further information on the event.

on_connection_error(event)[source]

Called when the peer closes the connection with an error condition.

Parameters

event (proton.Event) – The underlying event object. Use this to obtain further information on the event.

on_disconnected(event)[source]

Called when the socket is disconnected.

Parameters

event (proton.Event) – The underlying event object. Use this to obtain further information on the event.

on_link_error(event)[source]

Called when the peer closes the link with an error condition.

Parameters

event (proton.Event) – The underlying event object. Use this to obtain further information on the event.

on_message(event)[source]

Called when a message is received. The message itself can be obtained as a property on the event. For the purpose of referring to this message in further actions (e.g. if explicitly accepting it, the delivery should be used, also obtainable via a property on the event.

Parameters

event (proton.Event) – The underlying event object. Use this to obtain further information on the event. In particular, the message itself may be obtained by accessing event.message.

on_reactor_init(event)[source]

Called when the event loop - the reactor - starts.

Parameters

event (proton.Event) – The underlying event object. Use this to obtain further information on the event.

on_rejected(event)[source]

Called when the remote peer rejects an outgoing message.

Parameters

event (proton.Event) – The underlying event object. Use this to obtain further information on the event.

on_sendable(event)[source]

Called when the sender link has credit and messages can therefore be transferred.

Parameters

event (proton.Event) – The underlying event object. Use this to obtain further information on the event.

on_session_error(event)[source]

Called when the peer closes the session with an error condition.

Parameters

event (proton.Event) – The underlying event object. Use this to obtain further information on the event.

on_settled(event)[source]

Called when the remote peer has settled the outgoing message. This is the point at which it should never be retransmitted.

Parameters

event (proton.Event) – The underlying event object. Use this to obtain further information on the event.

on_start(event)[source]

Called when the event loop starts. (Just an alias for on_reactor_init)

Parameters

event (proton.Event) – The underlying event object. Use this to obtain further information on the event.

reject(delivery)

Rejects a received message that is considered invalid or unprocessable.

Note

This method cannot currently be used in combination with transactions. See proton.reactor.Transaction for transactional methods.

Parameters

delivery (proton.Delivery) – The message delivery tracking object

release(delivery, delivered=True)

Releases a received message, making it available at the source for any (other) interested receiver. The delivered parameter indicates whether this should be considered a delivery attempt (and the delivery count updated) or not.

Note

This method cannot currently be used in combination with transactions. See proton.reactor.Transaction for transactional methods.

Parameters
  • delivery (proton.Delivery) – The message delivery tracking object

  • delivered (bool) – If True, the message will be annotated with a delivery attempt (setting delivery flag proton.Delivery.MODIFIED). Otherwise, the message will be returned without the annotation and released (setting delivery flag proton.Delivery.RELEASED

settle(delivery, state=None)

Settles the message delivery, and optionally updating the delivery state.

Parameters
  • delivery (proton.Delivery) – The message delivery tracking object

  • state (int or None) – The delivery state, or None if not update is to be performed.

class proton.Event(impl, number, clsname, context)[source]

Notification of a state change in the protocol engine.

property connection

The connection associated with the event, or None if none is associated with it.

Type

Connection

property context

The context object associated with the event.

Type

Depends on the type of event, and include the following: - Connection - Session - Link - Delivery - Transport

property delivery

The delivery associated with the event, or None if none is associated with it.

Type

Delivery

property link

The link associated with the event, or None if none is associated with it.

Type

Link

property reactor

Deprecated - The reactor.Container (was reactor) associated with the event.

property receiver

The receiver link associated with the event, or None if none is associated with it. This is essentially an alias for link(), that does an additional check on the type of the link.

Type

Receiver (<– CHECK!)

property sender

The sender link associated with the event, or None if none is associated with it. This is essentially an alias for link(), that does an additional check on the type of the link.

Type

Sender (<– CHECK!)

property session

The session associated with the event, or None if none is associated with it.

Type

Session

class proton.Message(body=None, **kwargs)[source]

The Message class is a mutable holder of message content.

Variables
  • instructions (dict) – delivery instructions for the message (“Delivery Annotations” in the AMQP 1.0 spec)

  • annotations (dict) – infrastructure defined message annotations (“Message Annotations” in the AMQP 1.0 spec)

  • properties (dict) – application defined message properties

  • body (bytes | unicode | dict | list | int | long | float | UUID) – message body

Parameters

kwargs – Message property name/value pairs to initialize the Message

property address

The address of the message.

Type

str

Raise

MessageException if there is any Proton error when using the setter.

property content_encoding

The content-encoding of the message.

Type

symbol

Raise

MessageException if there is any Proton error when using the setter.

property content_type

The RFC-2046 [RFC2046] MIME type for the message body.

Type

symbol

Raise

MessageException if there is any Proton error when using the setter.

property correlation_id

The correlation-id for the message.

Type

The valid AMQP types for a correlation-id are one of:

  • int (unsigned)

  • uuid.UUID

  • bytes

  • str

property creation_time

The creation time of the message in seconds using the Unix time_t [IEEE1003] encoding.

Type

int

Raise

MessageException if there is any Proton error when using the setter.

decode(data)[source]
property delivery_count

The number of delivery attempts made for this message.

Type

int

Raise

MessageException if there is any Proton error when using the setter.

property durable

The durable property indicates that the message should be held durably by any intermediaries taking responsibility for the message.

Type

bool

Raise

MessageException if there is any Proton error when using the setter.

encode()[source]
property expiry_time

The absolute expiry time of the message in seconds using the Unix time_t [IEEE1003] encoding.

Type

int

Raise

MessageException if there is any Proton error when using the setter.

property first_acquirer

True iff the recipient is the first to acquire the message, False otherwise.

Type

bool

Raise

MessageException if there is any Proton error when using the setter.

property group_id

The group id of the message.

Type

str

Raise

MessageException if there is any Proton error when using the setter.

property group_sequence

The sequence of the message within its group.

Type

int

Raise

MessageException if there is any Proton error when using the setter.

property id

The globally unique id of the message, and can be used to determine if a received message is a duplicate. The allowed types to set the id are:

Type

The valid AMQP types for an id are one of:

  • int (unsigned)

  • uuid.UUID

  • bytes

  • str

property priority

The relative priority of the message, with higher numbers indicating higher priority. The number of available priorities depends on the implementation, but AMQP defines the default priority as the value 4. See the OASIS AMQP 1.0 standard for more details on message priority.

Type

int

Raise

MessageException if there is any Proton error when using the setter.

recv(link)[source]

Receives and decodes the message content for the current Delivery from the link. Upon success it will return the current delivery for the link. If there is no current delivery, or if the current delivery is incomplete, or if the link is not a receiver, it will return None.

Parameters

link (Link) – The link to receive a message from

Returns

the delivery associated with the decoded message (or None)

Return type

Delivery

property reply_to

The reply-to address for the message.

Type

str

Raise

MessageException if there is any Proton error when using the setter.

property reply_to_group_id

The group-id for any replies.

Type

str

Raise

MessageException if there is any Proton error when using the setter.

send(sender, tag=None)[source]

Encodes and sends the message content using the specified sender, and, if present, using the specified tag. Upon success, will return the Delivery object for the sent message.

Parameters
  • sender (Sender) – The sender to send the message

  • tag (bytes) – The delivery tag for the sent message

Returns

The delivery associated with the sent message

Return type

Delivery

property subject

The subject of the message.

Type

str

Raise

MessageException if there is any Proton error when using the setter.

property ttl

The time to live of the message measured in seconds. Expired messages may be dropped.

Type

int

Raise

MessageException if there is any Proton error when using the setter.

property user_id

The user id of the message creator.

Type

bytes

Raise

MessageException if there is any Proton error when using the setter.

class proton.Terminus(impl)[source]

A source or target for messages.

property address

The terminus address.

Type

str

property capabilities

Capabilities of the source or target.

Type

Data containing an array of symbol.

property dynamic

The dynamic flag for this terminus object. This indicates if this terminus was dynamically created.

Type

bool

property filter

A filter on a source allows the set of messages transfered over the link to be restricted. The symbol-keyed map represents a’ filter set.

Type

Data containing a map with symbol keys.

property properties

Properties of a dynamic source or target.

Type

Data containing a map with symbol keys.

Delivery guarantees

For at-most-once, the sender settles the message as soon as it sends it. If the connection is lost before the message is received by the receiver, the message will not be delivered.

For at-least-once, the receiver accepts and settles the message on receipt. If the connection is lost before the sender is informed of the settlement, then the delivery is considered in-doubt and should be retried. This will ensure it eventually gets delivered (provided of course the connection and link can be reestablished). It may mean that it is delivered multiple times though.

Finally, for exactly-once, the receiver accepts the message but doesn’t settle it. The sender settles once it is aware that the receiver accepted it. In this way the receiver retains knowledge of an accepted message until it is sure the sender knows it has been accepted. If the connection is lost before settlement, the receiver informs the sender of all the unsettled deliveries it knows about, and from this the sender can deduce which need to be redelivered. The sender likewise informs the receiver which deliveries it knows about, from which the receiver can deduce which have already been settled.