[ejabberd] How does ejabberd handle messages sent to a recipient with multiple resources?
michael.weibel at gmail.com
Fri Apr 20 14:30:42 MSK 2012
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?
More information about the ejabberd