How to listen to all the packets?

Hello there,

I’ve been evaluating openfire integration with our existing IM service which works with our legacy application suit so that we can continue to use whatever we currently have. I’m thinking for a middleware component which will listen to all the XMPP packets (not just between one jid and server) and transform them to legacy format if needed. Given abive background, I was wondering if there is specific configuration in openfire where I can connect to a port and listen to all the xml messages being sent and received to the server. I tried digging into external component and server to server setting but I didn’t find any solution yet. I didn’t have much luck finding any documentation for such configuration.

Any help is appreciated.

-Subi

Hi Subi,

You’ll probably want to develop a custom plugin that uses a PacketInterceptor. If you download the Openfire source take a look at the Monitoring, Packet Filter and/or Subscription plugins for examples on how to use a PacketInterceptor.

Hope that helps,
Ryan

I’m thinking for a middleware component which will listen to all the
XMPP packets (not just between one jid and server) and transform them
to legacy format if needed.
Sounds like a transport. Take a look on IM Gateway plugin.

Coolcat wrote:

I’m thinking for a middleware component which will listen to all the
XMPP packets (not just between one jid and server) and transform them
to legacy format if needed.
Sounds like a transport. Take a look on IM Gateway plugin.

Could be. I’m not going to try and read Subi’s mind but he did state he wanted to listen to “all packets” and transform (copy and/or redirect?) them “if needed”.

Cheers,

Ryan

Thanks for the response Ryan,

You are right, I will be writing an intercepter but the issue here is that since I’m trying to integrate two IM systems (the legacy one doesn’t follow any standard protocol) so I need to provide a bridge or transformation service which connects to both of these servers. We already have interfaces developed using .NET framework to communicate with the legacy server and I’m trying to squeez this intercepter as a part of that framework. This is why I was wondering if there is a configuration setting that allows openfire server to broadcast the messages or packets and I can just connect one of the endpoints to it.

Ah, I see. I think really the best approach would be to develop your own plugin, that way you can define what it means to broadcast packets, i.e. who is allowed to listen to the broadcasts, how do you listen/connect to the broadcast, what packets are broadcast, etc.

Cheers,

Ryan