powered by Jive Software

Plugin with multiple recipients

Is it possible to write a plugin with multiple internal recipients (sort of like the gateway/kraken plugin) but without using multiple Component implementations? eg. the gateway plugin is a single plugin which registers multiple Components so that it can receive packets addressed to msn.hostname, aim.hostname, icq.hostname etc.

I’m writing a contact synchronization plugin which connects to multiple contact sources (eg. Exchange, Domino, Zimbra, Asterisk etc.) on the user’s behalf and sends the user contact info as vCards. I’d like to have multiple recipients within my plugin, each responsible for a contact source, but I don’t want them to each take up a component address. Any alternatives to component for this?

Hi Leon,

you could register a component e.g. contacts.domain.lt and address the different sources in the node part of the JID e.g. exchange@contacs.domain.lt, domino@contacts.domain.lt, … or the resource part e.g. contacts.domain.lt/Exchange, contacts.domain.lt/Domino,.

That’s an interesting idea. I didn’t know a component could be addressed as recipient@component.host (I thought it could only be component.host - I should read the XMPP XEPs!) Would an IQDiscoInfoHandler be better though as @Stefan Reuter describes here?

Providing server features through a plugin (for XEP-0136)