This document specifies an XMPP protocol extension for message receipts.
WARNING: This Standards-Track document is Experimental. Publication as an XMPP Extension Protocol does not imply approval of this proposal by the XMPP Standards Foundation. Implementation of the protocol described herein is encouraged in exploratory implementations, but production systems should not deploy implementations of this protocol until it advances to a status of Draft.
Series: XEP
Number: 0184
Publisher: XMPP Standards Foundation
Status:
Experimental
Type:
Standards Track
Version: 0.3
Last Updated: 2006-11-06
Approving Body: XMPP Council
Dependencies: XMPP Core
Supersedes: XEP-0022 (in part)
Superseded By: None
Short Name: TO BE ASSIGNED
Wiki Page: <http://wiki.jabber.org/index.php/Message Receipts (XEP-0184)>
Email:
stpeter@jabber.org
JabberID:
stpeter@jabber.org
Email:
jhildebrand@jabber.com
JabberID:
hildjj@jabber.org
This XMPP Extension Protocol is copyright 1999 - 2007 by the XMPP Standards Foundation (XSF) and is in full conformance with the XSF's Intellectual Property Rights Policy <http://www.xmpp.org/extensions/ipr-policy.shtml>. This material may be distributed only subject to the terms and conditions set forth in the Creative Commons Attribution License (<http://creativecommons.org/licenses/by/2.5/>).
The preferred venue for discussion of this document is the Standards discussion list: <http://mail.jabber.org/mailman/listinfo/standards>.
The Extensible Messaging and Presence Protocol (XMPP) is defined in the XMPP Core (RFC 3920) and XMPP IM (RFC 3921) specifications contributed by the XMPP Standards Foundation to the Internet Standards Process, which is managed by the Internet Engineering Task Force in accordance with RFC 2026. Any protocol defined in this document has been developed outside the Internet Standards Process and is to be understood as an extension to XMPP rather than as an evolution, development, or modification of XMPP itself.
The following keywords as used in this document are to be interpreted as described in RFC 2119: "MUST", "SHALL", "REQUIRED"; "MUST NOT", "SHALL NOT"; "SHOULD", "RECOMMENDED"; "SHOULD NOT", "NOT RECOMMENDED"; "MAY", "OPTIONAL".
1. Introduction
2. Requirements
3. Protocol Format
4. Business Rules
5. Service Discovery
6. Negotiation
7. Implementation Notes
8. Security Considerations
9. IANA Considerations
10. XMPP Registrar Considerations
10.1. Rule Conditions Registry
10.2. Field Standardization
11. Acknowledgements
Notes
Revision History
While Advanced Message Processing [1] 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 Message Events [2], which this specification in part obsoletes. [3]
This document addresses the following requirements:
Note: This document explicitly does not define a protocol for "guaranteed delivery", since that term (like "security") means different things to different people. Instead, we define a more focused protocol that addresses the need for message receipts, thus solving one problem that falls under the heading of "guaranteed delivery".
In order to make it possible for senders to request and for recipients to generate message receipts, we define a new Advanced Message Processing rule: "receipt". In accordance with XEP-0079, we provide the following information about the receipt rule:
The following is an example of a message that includes a request for return receipt.
<message from='northumberland@shakespeare.lit/westminster' id='richard2-4.1.247' to='kingrichard@royalty.england.lit/throne'> <body>My lord, dispatch; read o'er these articles.</body> <amp xmlns='http://jabber.org/protocol/amp'> <rule condition='receipt' action='notify' value='received'/> </amp> </message>
The recipient MUST generate a receipt if and only if it meets all of the following criteria:
<message from='kingrichard@royalty.england.lit/throne' id='richard2-4.1.247' to='northumberland@shakespeare.lit/westminster'> <amp xmlns='http://jabber.org/protocol/amp' status='notify'> <rule condition='receipt' action='notify' value='received'/> </amp> </message>
If the recipient does not meet all of the foregoing criteria, it MUST NOT return a receipt and MUST NOT return an error.
The general business rules specified for Advanced Message Processing in XEP-0079 apply to any rule; in addition, the following business rules apply specifically to the receipt rule:
A sender SHOULD NOT include a request for message receipts when sending a message to the bare JID (<node@domain.tld>) of the recipient, only when sending to a full JID (<node@domain.tld/resource>).
A sender SHOULD NOT include a request for message receipts unless it knows (via Service Discovery [4] or Entity Capabilities [5]) that the intended recipient supports the protocol described herein or unless the use of message receipts is negotiated via Stanza Session Negotiation [6].
Naturally, the receipt rule can be combined wiith rules specified in XEP-0079 (e.g., the deliver rule) for more complete reporting.
If a sender wishes to request message receipts, it SHOULD first discover whether the intended recipient supports message receipts. Support can be discovered indirectly via Entity Capabilities or directly via Service Discovery.
If an entity supports Advanced Message Processing, it MUST report that by including a service discovery feature of "http://jabber.org/protocol/amp" as described in XEP-0079:
<iq from='northumberland@shakespeare.lit/westminster' to='kingrichard@royalty.england.lit/throne' type='get'> <query xmlns='http://jabber.org/protocol/disco#info'/> </iq>
<iq from='kingrichard@royalty.england.lit/throne' to='northumberland@shakespeare.lit/westminster' type='result'> <query xmlns='http://jabber.org/protocol/disco#info'> ... <feature var='http://jabber.org/protocol/amp'/> ... </query> </iq>
An entity that supports Advanced Message Processing SHOULD also maintain a service discovery node named "http://jabber.org/protocol/amp", at which it advertises the individual actions and conditions it supports. If an entity supports message receipts, it SHOULD respond to service discovery information requests sent to that node with a reply that includes the 'http://jabber.org/protocol/amp?condition=receipt' condition:
<iq from='northumberland@shakespeare.lit/westminster' to='kingrichard@royalty.england.lit/throne' type='get'> <query xmlns='http://jabber.org/protocol/disco#info' node='http://jabber.org/protocol/amp'/> </iq>
<iq from='kingrichard@royalty.england.lit/throne' to='northumberland@shakespeare.lit/westminster' type='result'> <query xmlns='http://jabber.org/protocol/disco#info' node='http://jabber.org/protocol/amp'> ... <feature var='http://jabber.org/protocol/amp?condition=receipt'/> ... </query> </iq>
Two entities MAY negotiate the use of message receipts for a given session using Chat Session Negotiation. The parameter to be negotiated is named "http://jabber.org/protocol/amp?condition=receipt". Its use is illustrated in the following examples.
<message type='normal' from='northumberland@shakespeare.lit/westminster' to='kingrichard@royalty.england.lit/throne' id='init1'> <thread>ffd7076498744578d10edabfe7f4a866</thread> <feature xmlns='http://jabber.org/protocol/feature-neg'> <x xmlns='jabber:x:data' type='form'> <field var='FORM_TYPE' type='hidden'> <value>http://jabber.org/protocol/chatneg</value> </field> <field label='Accept this chat?' type='boolean' var='accept'> <value>true</value> <required/> </field> <field label='Enable Message Receipts?' type='boolean' var='http://jabber.org/protocol/amp?condition=receipt'> <value>0</value> </field> </x> </feature> </message>
<message type='normal' from='kingrichard@royalty.england.lit/throne' to='northumberland@shakespeare.lit/westminster' id='init1'> <thread>ffd7076498744578d10edabfe7f4a866</thread> <feature xmlns='http://jabber.org/protocol/feature-neg'> <x xmlns='jabber:x:data' type='submit'> <field var='FORM_TYPE' type='hidden'> <value>http://jabber.org/protocol/chatneg</value> </field> <field var='accept'> <value>true</value> </field> <field var='http://jabber.org/protocol/amp?condition=receipt'> <value>1</value> </field> </x> </feature> </message>
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 the Internet Assigned Numbers Authority (IANA) [7] is necessary as a result of this document.
The XMPP Registrar [8] maintains a registry of Advanced Message Processing <rule/> conditions (see <http://www.xmpp.org/registrar/amp-conditions.html>). The Registrar shall add the following condition to the registry:
<condition> <name>receipt</name> <ns>http://jabber.org/protocol/amp?condition=receipt</ns> <per-hop>false</per-hop> <value>received</value> <processing> The condition is met if a message processing application (client) controlled by the intended recipient has received and processed the message, including presentation to a human user if appropriate. </processing> <doc>XEP-0184</doc> </condition>
Field Standardization for Data Forms [9] 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 <http://www.xmpp.org/registrar/formtypes.html>). The Registrar shall add the following field for use in Chat Session Negotiation forms:
<form_type> <name>http://jabber.org/protocol/chatneg</name> <field var='http://jabber.org/protocol/amp?condition=receipt' type='boolean' label='Whether to enable Message Receipts per XEP-0184'/> </form_type>
Thanks to Joe Kemp and Kevin Smith for their input.
1. XEP-0079: Advanced Message Processing <http://www.xmpp.org/extensions/xep-0079.html>.
2. XEP-0022: Message Events <http://www.xmpp.org/extensions/xep-0022.html>.
3. 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.
4. XEP-0030: Service Discovery <http://www.xmpp.org/extensions/xep-0030.html>.
5. XEP-0115: Entity Capabilities <http://www.xmpp.org/extensions/xep-0115.html>.
6. XEP-0155: Stanza Session Negotiation <http://www.xmpp.org/extensions/xep-0155.html>.
7. The Internet Assigned Numbers Authority (IANA) is the central coordinator for the assignment of unique parameter values for Internet protocols, such as port numbers and URI schemes. For further information, see <http://www.iana.org/>.
8. The XMPP Registrar maintains a list of reserved protocol namespaces as well as registries of parameters used in the context of XMPP extension protocols approved by the XMPP Standards Foundation. For further information, see <http://www.xmpp.org/registrar/>.
9. XEP-0068: Field Data Standardization for Data Forms <http://www.xmpp.org/extensions/xep-0068.html>.
Removed reliability features, which belong at a different level.
(psa)Added two more scenarios; defined business rule about not sending to bare JIDs; specified security consideration regarding presence leaks.
(psa)Initial version.
(psa)Added text and examples for service discovery; added text and examples for chat session negotiation; added recommendations regarding message processing, retries, etc.
(psa)First draft.
(psa)END