Using Smack/Wildfire to control servers?

I’m looking into using Smack and Openfire to control clusters of (internal) servers. The idea is that these servers come online to a central wildfire server and that they can then receive commands over the XMPP channel. Commands like ‘restart/reload service xyz’ or ‘install new version of service xyz’.

I’ve made a really simple start by creating a process that uses Smack to connect to Wildfire. Basically as described on the ml page. I’m connecting all servers in a specific cluster with the same jid and a unique id as the resource name.

The problem is that only one server receives the message that I am sending. It seems that the last one connected has the highest priority and only that client is actually receiving the message.

Am I approaching this the wrong way? Is there a better way to do broadcasting to multiple clients?


Hi Stefan,

You might want to look at JIRA issue JM-14 and try setting the route.all-resources property to true. If that doesn’t work for you might be better of having each of your servers sign in using their own unique JID.

Hope that helps,


Thanks Ryan. I will try this!

I’m also reading about PubSub now, PEP-0060. Isn’t that actually a more appropriate way of doing broadcasting of events/notifications to groups of clients?


Given what you’re trying to do PubSub might be a good way to go. However, it is a bit complicated and requires more work to implement so if you’re close to having a working solution with what you’re currently doing I wouldn’t rush to throw it out and replace it with PubSub if you don’t need to.