%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://xmpp.org/schemas/receipts.xsd &stpeter; &hildjj; 1.2rc1 2011-02-16 psa

Clarified terminology and several points of implementation.

1.1 2010-03-31 psa
  • Clarified the level of reliability that this protocol provides and, most importantly, does not provide.
  • Explicitly discouraged dependence on receipts unless some other protocol is used to negotiate the use of message receipts.
  • Provided explicit recommendations about when and when not to request receipts.
  • 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.
  • Added 'id' attribute to <received/> element for tracking purposes.
  • Removed text about XEP-0155 negotiation.
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. Naturally, message receipts can be combined with the rules specified in Advanced Message Processing for more complete reporting. 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.

The term "content message" refers to the stanza for which the original sender would like to receive a receipt.

The term "ack message" refers to the stanza by which the recipient acknowledges receipt of the content message.

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

Because of these significant limitations, this protocol does not provide complete or even partial reliability or guaranteed delivery. Therefore, the sender SHOULD NOT impute any meaning to the fact that it has not received an ack message, unless it has established with the recipient that receipt requests will be honored; however, methods for doing so are out of scope for this specification and it is NOT RECOMMENDED to take any particular action (such as resending the content message) without such methods. This protocol merely provides a building block that could be used in conjunction with other protocols to asymptotically approach the eventual goal of messaging reliability and guaranteed delivery.

Because it is possible for a given content message to be delivered to multiple XMPP resources controlled by the recipient, the sender of the content message needs to be prepared to receive multiple ack messages.

A sender could request receipts on any non-error content message (chat, groupchat, headline, or normal) no matter if the recipient's address is a bare JID &LOCALBARE; or a full JID &LOCALFULL;. Whether it is appropriate or advisable to do so it another question. This section provides recommendations about when and when not to request receipts, and what results to expect in each scenario.

If the sender knows only the recipient's bare JID, it cannot cannot determine (via &xep0030; or &xep0115;) whether the intended recipient supports the Message Receipts protoocl. In this case, the sender MAY request a receipt when sending a content message of type "chat", "headline", or "normal" to the recipient's bare JID. However, the sender MUST NOT depend on receiving an ack message in reply.

If the sender knows a full JID for the recipient (e.g., via presence), it SHOULD attempt to determine (via service disco or entity capabilities) whether the client at that full JID supports the Message Receipts protocol before attempting to request receipts.

If the sender determines that the recipient's client does not support the Message Receipts protocol then it SHOULD NOT request a receipt when sending a content message to that full JID and MUST NOT depend on receiving an ack message.

If the sender determines that the recipient's client supports the Message Receipts protocol then it MAY request a receipt when sending a content message of type "chat", "headline", or "normal" to that full JID. However, even in this case the sender SHOULD NOT depend on receiving an ack message.

It is NOT RECOMMENDED to request a receipt when sending a content message of type "groupchat" in a &xep0045; room because the logic for determining when a content message is truly "received" by all of the room occupants is complex, and because the sender would receive one ack message from each occupant of the room, thus significantly increasing the number of stanzas sent through the room.

To prevent looping, an entity MUST NOT include a receipt request (i.e., the <request/> element) in an ack message (i.e., a message stanza that includes the <received/> element).

An entity MUST NOT send an ack message when a user views messages that have been archived or stored on the client or the server (e.g., via &xep0136;), only when first receiving the message.

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

]]> ]]>

Support can also be determined via &xep0115;, a.k.a. "caps".

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 an ack message containing the <received/> extensino if it has received and processed the content message. The term "processed" is to be understood as including 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 content message cannot be handled.

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

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

Note: A sender MUST include an 'id' attribute on every content message that requests a receipt, so that the sender can properly track ack messages.

The recipient shall generate an ack message 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).

]]>

When the recipient sends an ack message, it SHOULD ensure that the message stanza contains only one child element, namely the <received/> element qualified by the 'urn:xmpp:receipts' namespace. In addition, it SHOULD include an 'id' attribute that echoes the 'id' attribute of the content message. Naturally, intermediate entities might add other extension elements to the message when routing or delivering the receipt message, e.g., a <delay/> element as specified in &xep0203;.

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;).

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

Thanks to Steven te Brinke, Bruce Campbell, Joe Kemp, Kevin Smith, Remko Tronçon, Matthew Wild, and Kurt Zeilenga for their input.