[jdev] Duplicate registration of external component - expected according to XEP-0114?

Daniel Dormont dan at greywallsoftware.com
Mon May 2 22:55:16 UTC 2011


Hi folks, I'm a bit new to this world and developing my first applications using XMPP external components according to XEP-0114. I'm using Whack to develop the components themselves and Ejabberd as my server. I'm not looking for specific help using either of those technologies, rather trying to understand if the behavior I'm seeing is expected and if not, which side the problem is on. Here's the story:

1) Ejabberd allows multiple subdomains to be registered as external components using a single port and secret key.
2) Whack allows a single "component manager" to handle multiple components using that single port and key.

So far, so good. However:

3) Ejabberd assumes after a successful handshake that the component in question should handle traffic to *all* permitted subdomains for that port, regardless of the "to" value sent in the "stream:stream" packet, and registers internal routes for all of them. But,
4) Whack creates a new connection for each component you wish to register, assuming it will receive traffic for only that component's subdomainh .

So, what ends up happening is that for each packet destined for any of the listed subdomains, Ejabberd picks one of the connected components at random. 

I'm hoping that one of these two pieces is doing something wrong, and I'd like to know which one so I can pursue it further. Or, if I'm making a bad assumption and it is expected that my components should be able to handle packets intended for each other, that would be good to know too :)

thanks,
Dan 


More information about the JDev mailing list