[ejabberd] How does ejabberd handle messages sent to a recipient with multiple resources?

CGS cgsmcmlxxv at gmail.com
Fri Apr 20 15:38:21 MSK 2012


Hi Michael,

I don't know about the latest version, but, by default, Ejabberd uses the
(b) option (it has no "most available" resource algorithm) with capability
of having (a). At that time (half a year before or so), you could have
multiple login with different resources and all the recipients would get
the message. On the other hand, if you filter by resources (not so
difficult to add that type module; just negate the resource you don't want
or allow only what you want), then the message is sent to the allowed
available resource(s) or stored it offline for later delivery in case the
allowed resources for the recipients are not available (negative presence
for "most available" resource).

I hope this message will help.

CGS



On Fri, Apr 20, 2012 at 12:30 PM, Michael Weibel
<michael.weibel at gmail.com>wrote:

> Hi all,
>
> I just read the RFC 6121 about how to handle messages sent to a recipient
> which has multiple resources online with the same presence priority (quote)
> """"
> For a message stanza of type "chat":
>        • If the only available resource has a negative presence priority
> then the server SHOULD either (a) store the message offline for later
> delivery or (b) return a stanza error to the sender, which SHOULD be
>  <service-unavailable/>.
>        • If the only available resource has a non-negative presence
> priority then the server MUST deliver the message to that resource.
>        • If there is more than one resource with a non-negative presence
> priority then the server MUST either (a) deliver the message to the "most
> available" resource or resources (according to the server's
> implementation-specific algorithm, e.g., treating the resource or resources
> with the highest presence priority as "most available") or (b) deliver the
> message to all of the non-negative resources that have  opted in to receive
> chat messages.
> """
>
> So I have for instance 2 resources online with the same presence priority,
> how does ejabberd handle this? I think it uses an algorithm mentioned in
> the 3rd point with (a) and not the (b) one.
> For my use case, it would be better to have the (b) algorithm.
>
> Is it correct that ejabberd uses (a) and is it possible to change that in
> the configuration?
>
> Thanks.
>
> - Michael
>
> _______________________________________________
> ejabberd mailing list
> ejabberd at jabber.ru
> http://lists.jabber.ru/mailman/listinfo/ejabberd
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.jabber.ru/pipermail/ejabberd/attachments/20120420/53a9bf26/attachment.html>


More information about the ejabberd mailing list