%ents; ]>
Unique and Stable Stanza IDs This specification describes unique and stable IDs for stanzas. &LEGALNOTICE; 0359 Experimental Standards Track Standards Council XMPP Core stanza-id Florian Schmaus flo@geekplace.eu flo@geekplace.eu 0.2 2015-09-18 fs
  • Refactored client-id from attribute to element.
  • Set short name to 'stanza-id'.
  • Clarified that SID elements must not have additional content.
0.1 2015-07-14 XEP Editor (mam)

Initial published version approved by the XMPP Council.

0.0.2 2015-06-22 fs
  • Rename the XEP from "Message IDs" to "Stanza IDs"
  • Add 'by' attribute
0.0.1 2015-06-01 fs

First draft.

Unique and stable IDs for stanzas, which are set by a XMPP service, are beneficial in various ways. They can be used together with &xep0313; to uniquely identify a message within an archive. They are also useful in the context of &xep0045; conferences, in order to identify a message reflected by a MUC service back to the originating entity.

The herein defined stanza IDs must be unique and stable within the scope of the generating XMPP entity.

]]> In order to create a 'stanza-id' extension, the creating XMPP entity generates and sets the value of the 'id' attribute, and puts its own JID as value of the 'by' attribute. The value of the 'id' attribute must be unique and stable, i.e. it MUST NOT change later for some reason, within the scope of the 'by' value. Thus the IDs defined in this extension MUST be unique and stable within the scope of the generating XMPP entity. It is RECOMMENDED that the ID generating service uses UUID and the algorithm defined in RFC 4122, to generate the IDs.

Some use cases require the client to generate the stanza ID. In this case, the client MUST use the 'client-id' element.

Typical body text ]]>

The server or component MAY add a stanza-id element. In that case, it MUST preserve the content of the 'client-id' element.

Typical body text ]]>
  1. XMPP entities, which are routing stanzas, MUST NOT strip any elements qualified by the 'urn:xmpp:sid:0' namespace from message stanzas. They SHOULD however ensure that those elements contain only the attributes defined herein, and take approribate countermeasures if this is not the case (e.g. removing those attributes).
  2. The values of the 'id' attribute SHOULD be unpredictable.
  3. Stanza ID generating entities, which encounter a <stanza-id/> element where 'id' is already set and where the 'by' attribute matches their own JID, MUST ignore the existing value of 'id' and override it.
  4. Stanzas MUST posses, in the direct child level of the stanza, at most one 'stanza-id' extension element with the same JID as value of the 'by' attribute.
  5. Every <stanza-id> extension element MUST have the 'id' attribute and the 'by' attribute set.
  6. Every <stanza-id> and <client-id> extension element MUST always posses an 'id' attribute and MUST NOT have any child elements or text content.
  7. The value of the 'by' attribute MUST be a normalized JID as defined in &rfc6122;

The value of the 'id' attribute should not provide any further information besides the opaque ID itself. Entities observing the value MUST NOT be able to infer any information from it, e.g. the size of the message archive. The value of 'id' MUST be considered as non-secret values.

This document requires no interaction with &IANA;.

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

REQUIRED for protocol specifications.

Thanks to Thijs Alkemade and Georg Lukas for providing feedback.