XEP-0203: Delayed Delivery

This document defines an XMPP protocol extension for communicating the fact that an XML stanza has been delivered with a delay.


NOTICE: This document is currently within Last Call or under consideration by the XMPP Council for advancement to the next stage in the XSF standards process.


Document Information

Series: XEP
Number: 0203
Publisher: XMPP Standards Foundation
Status: Proposed
Type: Standards Track
Version: 0.3
Last Updated: 2007-03-28
Approving Body: XMPP Council
Dependencies: XMPP Core, XEP-0082
Supersedes: XEP-0091
Superseded By: None
Short Name: NOT YET ASSIGNED
Wiki Page: <http://wiki.jabber.org/index.php/Delayed Delivery (XEP-0203)>

Author Information

Peter Saint-Andre

Email: stpeter@jabber.org
JabberID: stpeter@jabber.org

Legal Notice

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

Discussion Venue

The preferred venue for discussion of this document is the Standards discussion list: <http://mail.jabber.org/mailman/listinfo/standards>.

Relation to XMPP

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.

Conformance Terms

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".


Table of Contents


1. Introduction
2. Protocol Definition
3. Examples
4. Implementation Notes
5. Security Considerations
6. IANA Considerations
7. XMPP Registrar Considerations
    7.1. Protocol Namespace
8. XML Schema
Notes
Revision History


1. Introduction

Although the XMPP protocol extension defined in Delayed Delivery [1] provides a way to communicate that an XML stanza (typically a <message/> or <presence/> stanza) has been delivered with a delay, the timestamp format defined in that document does not adhere to the recommended date and time profiles for XMPP protocols defined in XMPP Date and Time Profiles [2]. Therefore, this document defines a replacement for XEP-0091 which enables communication of delayed delivery information while adhering to XEP-0082.

2. Protocol Definition

The XML namespace defined herein is used to provide timestamp information about data stored for later delivery. The most common uses of this namespace are to stamp:

Information about the delivery delay is communicated by adding to the <message/> or <presence/> stanza one and only one <delay/> child qualified by a namespace to be issued when this specification advances to a status of Draft. This information is added by the server or component that delivers the stanza. The following attributes are defined for the <delay/> element:

Table 1: Defined Attributes

Attribute Definition Inclusion
from The Jabber ID of the entity that originally sent the XML stanza or that delayed the delivery of the stanza (e.g., the address of a multi-user chat room). RECOMMENDED
stamp The time when the XML stanza was originally sent. The format MUST adhere to the dateTime format specified in XEP-0082 and MUST be expressed in UTC. REQUIRED

In addition, the <delay/> element MAY contain XML character data that provides a natural-language description of the reason for the delay.

3. Examples

Example 1. Receiving a Message Sent While Offline

<message
    from='romeo@montague.net/orchard'
    to='juliet@capulet.com'
    type='chat'>
  <body>
    O blessed, blessed night! I am afeard.
    Being in night, all this is but a dream,
    Too flattering-sweet to be substantial.
  </body>
  <delay xmlns='http://www.xmpp.org/extensions/xep-0203.html#ns'
     from='capulet.com'
     stamp='2002-09-10T23:08:25Z'>
    Offline Storage
  </delay>
</message>
  

Example 2. Receiving the Last Presence Update of Another Entity

<presence from='juliet@capulet.com/balcony' to='romeo@montague.net'>
  <status>anon!</status>
  <show>xa</show>
  <priority>1</priority>
  <delay xmlns='http://www.xmpp.org/extensions/xep-0203.html#ns'
     from='juliet@capulet.com/balcony'
     stamp='2002-09-10T23:41:07Z'/>
</presence>
  

Example 3. Receiving Cached Messages from a Conference Room

<message
    from='coven@macbeth.shakespeare.lit/secondwitch'
    to='macbeth@shakespeare.lit/laptop'
    type='groupchat'>
  <body>
    By the pricking of my thumbs,
    Something wicked this way comes.
    Open, locks,
    Whoever knocks!
  </body>
  <delay xmlns='http://www.xmpp.org/extensions/xep-0203.html#ns'
     from='coven@macbeth.shakespeare.lit'
     stamp='2002-09-10T23:05:37Z'/>
</message>
  

4. Implementation Notes

This protocol was designed in a way that makes migration from XEP-0091 straightforward. All attributes present in the 'jabber:x:delay' namespace are present in the namespace defined herein. However, this document specifies a different format for the value of the <stamp> attribute (compliant with XEP-0082).

Implementations that support XEP-0091 should support the protocol defined herein as soon as possible, but should continue to support the protocol defined in XEP-0091 for backwards compatibility until the status of that specification is changed to Obsolete.

5. Security Considerations

Delayed delivery data can expose information about the sender's presence on the network at some time in the past. However, this introduces no new vulnerabilities, since the same information would have been available in real time.

6. IANA Considerations

This document requires no interaction with the Internet Assigned Numbers Authority (IANA) [5].

7. XMPP Registrar Considerations

7.1 Protocol Namespace

Until this specification advances to a status of Draft, its associated namespace shall be "http://www.xmpp.org/extensions/xep-0203.html#ns"; upon advancement of this specification, the XMPP Registrar shall issue a permanent namespace in accordance with the process defined in Section 4 of XMPP Registrar Function [6].

8. XML Schema

<?xml version='1.0' encoding='UTF-8'?>

<xs:schema
    xmlns:xs='http://www.w3.org/2001/XMLSchema'
    targetNamespace='http://www.xmpp.org/extensions/xep-0203.html#ns'
    xmlns='http://www.xmpp.org/extensions/xep-0203.html#ns'
    elementFormDefault='qualified'>

  <xs:element name='delay'>
    <xs:complexType>
      <xs:simpleContent>
        <xs:extension base='xs:string'>
          <xs:attribute name='from' type='xs:string' use='optional'/>
          <xs:attribute name='stamp' type='xs:string' use='required'/>
        </xs:extension>
      </xs:simpleContent>
    </xs:complexType>
  </xs:element>

</xs:schema>
  

Notes

1. XEP-0091: Delayed Delivery <http://www.xmpp.org/extensions/xep-0091.html>.

2. XEP-0082: XMPP Date and Time Profiles <http://www.xmpp.org/extensions/xep-0082.html>.

3. XEP-0160: Best Practices for Handling Offline Messages <http://www.xmpp.org/extensions/xep-0160.html>.

4. XEP-0045: Multi-User Chat <http://www.xmpp.org/extensions/xep-0045.html>.

5. 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/>.

6. XEP-0053: XMPP Registrar Function <http://www.xmpp.org/extensions/xep-0053.html>.


Revision History

Version 0.3 (2007-03-28)

Per a vote of the XMPP Council, advanced to Draft; also removed service discovery per Council discussion.

(psa)

Version 0.2 (2007-03-19)

Added service discovery section.

(psa)

Version 0.1 (2006-12-20)

Initial version.

(psa)

Version 0.0.1 (2006-12-19)

First draft. (psa)

END