Le 13/09/2012 14:57, Tomasz Sterna a écrit :
Dnia 2012-09-13, czw o godzinie 13:45 +0200, Alexandre Jousset pisze:
         AFAIK the routing to a domain is done only from c2s to sm when
a user connects. Then the sm answers with the domain in the "from"
part and gives its ID too for further communication. So, after this
moment c2s knows to which component it should send messages for that
user session.

         My question is: is this the only case where the routing to a
domain is needed?

The other case is communicating with the jabber server (sm) itself.
You can disco the domain to see the server features. You can xmpp-ping
the domain, you can even get server presence (it has some resources
answering).

         If yes, in case of domain routing (e.g. when "to" is
"example.com") one should only route to one of the bound component
serving that domain, maybe randomly. If no, ...?

Not randomly. To the highest priority bind.

        Yes, sorry, I meant "randomly between components bound with same 
priority".

But what happens if there are many binds of the same priority?

Cannot do "randomly", as messages need to go to all highest priority
resources.
Cannot do "all", as iq requests would get response many times.

        See above.

         That is not the same as routing to "u...@example.com" without
resource because in that case we said we should duplicate the message
to all components bound to this user (whatever their resources).

Not all.
I suggested that the priority of the bare-JID bind should be equal to
the highest priority resource connected to sm.

        Yes, sorry again, I meant with taking priority into account.

But then - what happens if two resources of the same priority get
connected to two different sm instances?

        *This* was my real question ;-)
--
--      \^/                                            --
--    -/ O \---------------------------------------    --
--   | |/ \|      Alexandre (Midnite) Jousset      |   --
--    -|___|---------------------------------------    --


Reply via email to