[jdev] Can an external XMPP component to listen to certain events on the server side such as a buddy request?

Ilya Braude ilya at drakontas.com
Mon Jan 25 15:38:06 CST 2010

Hi Karsten,

Karsten J wrote:
> Hello,
> I am studying at a University in Germany. We started a little project
> which tracks the location of people, connects them and helps them to
> interact on different levels. Well, in the end it will.
> We decided to use XMPP as our protocol and as it turns out there is
> almost always an XEP which covers something we want to do. I really
> start liking it.
> Since we don't have the capacity to write our own server we decide to
> use an existing one and enhance its features with an external
> component. However, I kinda ran into a problem and I hope you can help
> me out. In the XEP-0114 it says that an external component can do
> things that clients cannot. I tried to find a list of those things but
> till now I wasn't lucky. 

I've ran into a similar use case myself.   External components don't 
have that kind of access.  An external component basically registers 
itself as component.domain.com, and can send and receive messages 
from/to all JIDs at that domain (i.e. user1 at component.domain.com, 
user2 at component.domain.com, component.domain.com, etc.).  But the xmpp 
server will not route stanzas that are not addressed to the component to 
it, nor will the server allow the component to send stanzas addressed 
from other domains.

> There is one special thing my component needs
> to be able to do. I would like my component to listen to buddy
> requests and "buddy acceptances" of clients which are received by the
> server. As far as I know an internal component  or something like a
> packet interceptor as a plug in which sends the packets on to my
> component could do that. However, before I start writing a plug in for
> a specific server implementation I would like to know if there is a
> way within the specifications of the protocol.

We wrote a plugin for openfire that just forwards stanzas down an XML 
pipe over TCP, and use an external (non-XMPP) service to filter out the 
stanzas we are interested in using xpath expressions (this was really 
easy with twisted words/wokkel).

Alternatively, you can implement the logic completely inside your plugin. 

I don't think you'll be able to pass stanzas from a plugin or internal 
component to an external component directly, the component protocol 
doesn't support that.  If you really want to use an external XMPP 
component, I can only think of wrapping your original stanza in another 
stanza addressed to the component.

Good luck,

> I need this feature to do some logic on the component side.
> I hope you understand my problem and thank you for any advices.
> best whishes,
> Karsten Jeschkies
> _______________________________________________
> JDev mailing list
> Forum: http://www.jabberforum.org/forumdisplay.php?f=20
> Info: http://mail.jabber.org/mailman/listinfo/jdev
> Unsubscribe: JDev-unsubscribe at jabber.org
> _______________________________________________

Ilya Braude
Lead Software Engineer
Drakontas LLC
(267) 415-4769

More information about the JDev mailing list