XEP-0198: Stream Management is an XMPP extension adding stanza acknowledgements and stream resumption.

What does that mean in English? If you are using Jabber on your cell phone, you are not going to lose messages anymore whenever you get out of service coverage.

So, why do we need it?

Even though Jabber is using TCP, which is called a reliable protocol, messages can be lost when a user loses connectivity: the server still has an open TCP connection to your client, sends the message, and the message vanishes because you are gone. In the good case, the connection is immediately closed by your network provider, causing further messages to be stored on the server. In the bad case however, there is no reply (because your provider employs paranoid admins), and the server takes the usual TCP timeout (several minutes to hours) before taking you offline.

How can XEP-0198 save our lives?

The new proposal can not magically keep the connection while you are offline. However, it introduces two important elements to provide you with the messages you missed when you come back:

  • stanza acknowledgement allows both the server and the client to request a reply (acknowledgement) on every sent message or a group of messages. Once this reply is received, the messages are considered as delivered.

  • stream resumption is used when a connection is re-established. By including sequence numbers in the stanza acknowledgements, both client and server can tell each other which messages they received before the interruption, requesting to re-send later messages.

By combining these two enhancements, it is possible to provide a delivery guarantee for every message between you and your server. The same mechanism can also be used on S2S (server to server) links, however these are generally far more reliable.

XEP-0198 also allows to implement throttling of connections on busy servers, however this does not have such a big effect on the subjective reliability of Jabber.

Where can we get it?

Unfortunately, after XEP-0198 has been proposed to Draft Standard on 2009-06-17, not much has happened. Update: The following applications already support the extension:

  • Gajim (Gnome-oriented XMPP client)
  • jabberd2
  • Prosody (a lightweight Jabber server written in Lua)
  • Psi (multi-platform XMPP client)

If your favorite server/client is not in that list, there is something you can do:

  • provide patches for your favourite Jabber application.
  • kindly request the authors to implement it.
  • support existing requests.

Here you can find related requests for different Jabber software:

  • SMACK (Updated May 2011, original Forum thread) (a Java client library usable in mobile phones)
  • BEEM (Android XMPP client based on SMACK)
  • ejabberd (Updated Jan 2012: fork with XEP-0198) (scalable Jabber server written in Erlang)
  • Pidgin (multi-platform multi-protocol IM client)

Notes

There are several related extensions, like XEP-0184: Message Receipts or XEP-0199: XMPP Ping. However, these do not provide the reliability and efficiency of XEP-0198.

If you know of a client or server that supports XEP-0198, please feel free to leave a comment or drop an email to <georg@op-co.de>.