Dnia 2012-10-15, pon o godzinie 18:29 +0200, Alexandre Jousset pisze: > Is it because components could previously have same names that > there is « switch(targets->rtype) » at router/router.c:502, and all > the "multi" attribute, route_MULTI_TO and route_MULTI_FROM? > If not, I have misunderstood something about the purpose of > these...?
Take a look in the code how these are set. :-) In short, these choose on which attribute router does hash computation. In case of jabberd2 component protocol connections we have route_MULTI_TO, which computes hash of stanza "to" attribute. In case of legacy component connections we compute hash of "from" attribute. Legacy connections are used to connect transports, so we need to make sure all your packets are directed to the same transport instance - so we use "from" attribute (route_MULTI_FROM). jabberd2 component protocol connections are jabberd2 components like sm, s2s and we need to make sure all stanza sent to you are directed to the same sm instance - thus we compute hash of the "to" attribute to select sm instance to route to. So, you may remove this support from jabberd2 protocol connections, but we need to keep route_MULTI_FROM behavior for legacy component connections, as we cannot extend this protocol. -- Tomasz Sterna Instant Messaging Consultant : Open Source Developer http://tomasz.sterna.tv/ http://www.xiaoka.com/portfolio