This Question is Possibly Answered

1 "correct" answer available (10 pts) 2 "helpful" answers available (5 pts)
3 Replies Last post: Jul 2, 2008 11:45 AM by Ryan Graham  
Stefan Arentz Bronze 3 posts since
Jul 2, 2008
Currently Being Moderated

Jul 2, 2008 10:37 AM

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 http://www.igniterealtime.org/builds/smack/docs/latest/documentation/overview.ht 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?

 

S.

Ryan Graham KeyContributor 1,720 posts since
Jan 17, 2003
Currently Being Moderated
Jul 2, 2008 11:00 AM in response to: Stefan Arentz
Re: Using Smack/Wildfire to control servers?

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,

Ryan

Ryan Graham KeyContributor 1,720 posts since
Jan 17, 2003
Currently Being Moderated
Jul 2, 2008 11:45 AM in response to: Stefan Arentz
Re: Using Smack/Wildfire to control servers?

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.

 

Cheers,

Ryan

More Like This

  • Retrieving data ...