powered by Jive Software

Clustering. Why does Admin. Message comes double or 3times?

Dear all,

I found the Administration Message comes double or 3times if I use ‘Clustering plugin’(Opensource, http://code.google.com/p/open-clustering/source/checkout). For example, if you send the Administration message “AAA” from OpenFire Adimistration console web all the XMPP clients connected to that OpenFire server gets “AAA”,“AAA”,“AAA” 3 times.

I’m new to opefire and XMPP, and didn’t go thru the plugin source code. I just’d like to know that is ‘normal and intended’.

I also found that if I set ‘xmpp.server.clustering.loopback’ property to ‘false’, then I get the message 2wice, and if I set it ‘true’ then I get 3times.

I wonder I have to change the clustering plugin not to do that or I just need to ignore it.

Any ideas?

Thanks in advance.

Dear all,

I changed the ‘broadcastPacket’ function of ‘openfire’ source code like this.

public void broadcastPacket(Message packet, boolean onlyLocal) {

// // Send the message to client sessions connected to this JVM

// for(ClientSession session : localRoutingTable.getClientRoutes()) {

// session.process(packet);

// }

    // Check if we need to broadcast the message to client sessions connected to remote cluter nodes

if (!onlyLocal ){

if( remotePacketRouter != null) {

remotePacketRouter.broadcastPacket(packet);

}

}else{

        // Send the message to client sessions connected to this JVM

for(ClientSession session : localRoutingTable.getClientRoutes()) {

session.process(packet);

}

}

}

The difference with the original code is that to check ‘onlyLocal’ flag so that it is ‘only for local’ then I don’t call the ’

remotePacketRouter.broadcastPacket’.

I found that ‘remotePacketRouter.broadcastPacket()’ actually calls the local message broadcast again, so I believe the changes above does no harm to overall clustering stuffs…

But I guess we need to check.

Can somebody out there point me out any possible hazzardness those code change can bring??

Thanks in advance.

Bruce.