[Juser] Equal priority - what happens?

naw lambda512 at gmail.com
Tue May 13 05:20:22 CDT 2008


El Martes 13 Mayo 2008, Phil Reynolds escribió:
> What actually happens if you have two clients (with different resources,
> of course) logged in at the same priority and a message comes in
> directed at no particular resource? (assuming this situation is allowed
> in the first place)

From RFC3921, page 86:

>    4.  Else if the JID is of the form <user at domain> and there is at
>        least one available resource available for the user, the
>        recipient's server MUST follow these rules:
>
>        1.  For message stanzas, the server SHOULD deliver the stanza to
>            the highest-priority available resource (if the resource did
>            not provide a value for the <priority/> element, the server
>            SHOULD consider it to have provided a value of zero).  If two
>            or more available resources have the same priority, the
>            server MAY use some other rule (e.g., most recent connect
>            time, most recent activity time, or highest availability as
>            determined by some hierarchy of <show/> values) to choose
>            between them or MAY deliver the message to all such
>            resources.  However, the server MUST NOT deliver the stanza
>            to an available resource with a negative priority; if the
>            only available resource has a negative priority, the server
>            SHOULD handle the message as if there were no available
>            resources (defined below).  In addition, the server MUST NOT
>            rewrite the 'to' attribute (i.e., it MUST leave it as
>            <user at domain> rather than change it to <user at domain/
>            resource>).
>
>        2.  For presence stanzas other than those of type "probe", the
>            server MUST deliver the stanza to all available resources;
>            for presence probes, the server SHOULD reply based on the
>            rules defined in Presence Probes (Section 5.1.3).  In
>            addition, the server MUST NOT rewrite the 'to' attribute
>            (i.e., it MUST leave it as <user at domain> rather than change
>            it to <user at domain/resource>).
>
>        3.  For IQ stanzas, the server itself MUST reply on behalf of the
>            user with either an IQ result or an IQ error, and MUST NOT
>            deliver the IQ stanza to any of the available resources.
>            Specifically, if the semantics of the qualifying namespace
>            define a reply that the server can provide, the server MUST
>            reply to the stanza on behalf of the user; if not, the server
>            MUST reply with a <service-unavailable/> stanza error.




More information about the JUser mailing list