[ejabberd] ejabberd_service with multiple external components

Badlop badlop at gmail.com
Wed May 4 13:38:09 MSD 2011


2011/5/3 Daniel Dormont <dan at greywallsoftware.com>:
> I see that ejabberd_service allows multiple component subdomains to share a port and secret key.

Multiple subdomains: yes
Multiple programs: no

What I see in the ejabberd Guide is that each ejabberd_service allows
*one* component connection:
> ejabberd_service
> Interacts with an external component (as defined in the Jabber Component Protocol (XEP-0114).

And its option 'hosts' can be used to route to that component stanzas
that are sent to several JIDs:
> The external Jabber component that connects to this ejabberd_service can serve one or more hostnames.
> Note that you cannot define in a single ejabberd_service components of different services: add an ejabberd_service for each service, as seen in an example below.

The example that shows 'hosts' with several values is:
>  {5234, ejabberd_service, [{hosts, ["icq.example.org", "sms.example.org"],
>                             [{password, "jitsecret"}]}]},

And that is explained with:
> The ICQ transport JIT (icq.example.org and sms.example.org) is connected to port 5234
> with password ‘jitsecret’.


> What I see though, is that as soon as a component authenticates, ejabberd assumes that traffic for *all* of these subdomains must be sent to that component, regardless of the "to" value that was supplied in the initial stream:stream element.
>
> as soon as more than one component is connected

The ejabberd_service option 'hosts' is not designed or documented to do that.


> I've read through XEP-0114 and it *seems* to suggest that each connection should be used only
> for the component name that's given when the connection is created. Am I wrong about this?

In any case, ejabberd_service option 'hosts' gives just the
_possibility_ to the administrator and component developer to bypass
that. Maybe that feature is only useful for the old JIT program.


---
Badlop
ProcessOne


More information about the ejabberd mailing list