Next: , Previous: Presence, Up: Presence

2.5.1 Resources and priority

Every connection to an account has a specific name, a resource. The account itself has a JID of the form ‘username@server’ (a bare JID), but the connections have JIDs of the form ‘username@server/resource’ (a full JID). You can choose the resource name yourself by entering a JID of the latter form at the connection prompt (see Connecting), or by configuring it in jabber-account-list (see Account settings)

Each session has a priority. The priority determines what happens when a message is sent to the bare JID (i.e. without specifying what connection should receive message). Such messages are delivered to the connection with the highest non-negative priority value. If there are no connections, or if all connections have negative priority, the message is either stored on the server for later delivery or bounced to the sender, depending on the server configuration.

If there are several connections with the same priority, the behaviour depends on the server. Some server implementations deliver the message to all such connections, while others choose one connection depending on certain rules.

Note that these rules do not apply when a message is sent to a full JID. Such messages are sent to the specified resource, if it is still connected, and otherwise treated as messages to the bare JID. In the chat buffers of jabber.el, messages are sent to whatever JID the last message came from (usually a full JID), or to the bare JID if no message has been received yet. Other clients may have different behaviour.