[Standards] Namespace Priority

default at clientside.co.uk default at clientside.co.uk
Sun Feb 25 13:01:27 UTC 2007

The Yate and Jingle/Telepathy talks at FOSDEM got me thinking about the 
Resource Application Priority issue for non subscribers.

RAP (XEP-0168) solves the problem nicely, but only for people who I 
allow to subscribe to my presence. (Most people aren't going to divulge 
their presence to everyone who they are prepared to interact with.)

[Also a reasonable amount of the functionality can be implemented using a 
combination of XEP-0115 (Entity Capabilities) and <priority/>.]

I'm wondering about an alternative "Namespace Priority" approach which 
admittedly requires the servers to do a bit more work (something similar to 
what AFAICT the Tigase server is already doing).

After login, the client (or component or module) tells the server which 
namespaces it supports and the associated priorities:

<iq type="set" id="setNAPs">
 <register xmlns='http://jabber.org/protocol/np'>
   <ns priority='5'>http://jabber.org/protocol/jingle/description/audio</ns>
   <ns priority='5'>http://www.xmpp.org/extensions/xep-

Whenever the server receives messages sent to *bare JIDs* it checks for 
'np' elements. If it finds a <np/> element then it forwards the message 
to the resource that registered for the specified namespace with the 
highest priority. If it finds that no resource registered for the 
namespace then it handles the message as if it contained no <np/> element.

<message to='juliet at capulet.com'>
 <np xmlns='http://jabber.org/protocol/np' 
 application specific content here

Note the server doesn't need to examine messages sent to full JIDs, 
which should significantly reduce the work required. If the sender has 
the full JID they can do a disco (if you don't already know from 

- Ian

More information about the Standards mailing list