%ents; ]>
Message Receipts This specification defines an XMPP protocol extension for message receipts, whereby the sender of a message can request notification that it has been received by the intended recipient. &LEGALNOTICE; 0184 Draft Standards Track Standards Council XMPP Core XEP-0022 (in part) receipts http://www.xmpp.org/schemas/receipts.xsd &stpeter; &hildjj; 1.1rc2 in progress, last updated 2010-02-26 psa

Relaxed the business rules to allow inclusion of receipt requests even to the bare JID and even if the sender does not yet know whether the intended recipient supports this protocol; clarified the level of reliability that this protocol does and does not provide.

1.0 2007-09-26 psa

Per a vote of the XMPP Council, advanced to Draft.

0.4 2007-05-30 psa

Per Council feedback, modified to use dedicated namespace (not AMP).

0.3 2006-11-06 psa

Removed reliability features, which belong at a different level.

0.2 2006-09-21 psa

Added two more scenarios; defined business rule about not sending to bare JIDs; specified security consideration regarding presence leaks.

0.1 2006-04-11 psa

Initial version.

0.0.2 2006-04-07 psa

Added text and examples for service discovery; added text and examples for chat session negotiation; added recommendations regarding message processing, retries, etc.

0.0.1 2006-03-27 psa

First draft.

While &xep0079; provides message acknowledgements at the server level, it does not extend that model all the way to the client. However, sometimes client-level acknowledgements are needed, for example to provide "receipts". This document defines a mechanism for XMPP message receipts, which are functionally equivalent to the "delivered" or "displayed" event in &xep0022;, which this specification in part obsoletes. This specification does not distinguish between delivery and presentation, as was done in the message events protocol, in part because no existing clients make the distinction.

Note: This extension is functionally equivalent to an Advanced Message Processing rule of "receipt" but uses a dedicated namespace to simplify processing by end user clients and intermediate routers.

This document addresses the following requirements:

  1. Enable a sender to request notification that an XMPP message stanza has been received.
  2. Enable a recipient to provide message receipts if desired.

This document defines a protocol that enables a sender to ask the recipient to return a receipt for a message. Although the return of a message receipt lets the sender know that the message has been delivered, there are many reasons why the sender might not receive a receipt immediately or at all, including but not limited to the following:

Therefore this document does not define a protocol for complete reliability or guaranteed delivery, and those who implement and deploy this protocol need to be aware of its limitations.

In order to make it possible for senders to request and for recipients to generate message receipts, we define a dedicated protocol extension qualified by the 'urn:xmpp:receipts' namespace.

There are two allowable elements in this namespace:

Specifically, the receiving entity shall return a <received/> notice if it has received and processed the message. The term "processed" is understood to include presentation to a human user if appropriate or any other application-specific client-side processing, including generation of an error response if the application determines that the message contents cannot be handled.

The following is an example of a message that includes a request for return receipt.

My lord, dispatch; read o'er these articles. ]]>

The recipient shall generate a receipt if and only if it supports the protocol defined herein and it is configured to return receipts, either globally or for this recipient (otherwise it MUST NOT return a receipt and SHOULD NOT return an error).

]]>

The <received/> element SHOULD be the only child of the &MESSAGE; stanza and MUST mirror the 'id' of the sent message.

The following business rules apply:

  1. If receipts are desired, a sender SHOULD include a request for message receipts on all messages, no matter whether sending to the bare JID &LOCALBARE; of the recipient or the full JID &LOCALFULL;.

  2. A sender MUST include an 'id' attribute on the message so that the sender can properly track the receipt.

Naturally, message receipts can be combined with the rules specified in Advanced Message Processing (e.g., the deliver rule) for more complete reporting.

If an entity supports message receipts, it MUST report that by including a service discovery feature of "urn:xmpp:receipts" in response to disco#info requests:

]]> ]]>

A sender MAY include a request for message receipts even if it has not been able to determine if the intended recipient supports message receipts. This can be done directly via Service Discovery or indirectly via Entity Capabilities.

Two entities MAY negotiate the use of message receipts for a given session using Stanza Session Negotiation. The parameter to be negotiated is named "urn:xmpp:receipts". Its use is illustrated in the following examples.

ffd7076498744578d10edabfe7f4a866 urn:xmpp:ssn true 0 ]]> ffd7076498744578d10edabfe7f4a866 urn:xmpp:ssn true 1 ]]>

Although a sender MAY attempt to resend a message if it knows that the recipient supports message receipts and it does not receive a reply within some configurable timeout period, resend logic is out of scope for this specification.

It is possible for a recipient to leak its presence when returning message receipts; therefore, a recipient SHOULD NOT return message receipts to senders who are not otherwise authorized to view its presence.

No interaction with &IANA; is necessary as a result of this document.

The ®ISTRAR; includes "urn:xmpp:receipts" in its registry of protocol namespaces (see &NAMESPACES;).

&xep0068; defines a process for standardizing the fields used within Data Forms qualified by a particular namespace, and the XMPP Registrar maintains a registry of such fields (see &FORMTYPES;). The Registrar shall add the following field for use in Stanza Session Negotiation forms:

urn:xmpp:ssn ]]>
The protocol documented by this schema is defined in XEP-0184: http://www.xmpp.org/extensions/xep-0184.html ]]>

Thanks to Joe Kemp and Kevin Smith for their input.