Sending a payload to multiple nodes in Openfire

Hi,

Is there any way to send a payload to multiple nodes in Openfire?

We are using openfire in a publish subscribe scenario with Smack and the data is dynamic enough to rule out collection nodes.

I was hoping there might be a way to indicate multiple node ids in a single message.

The idea is to try and speed up the message delivery at the client and spend less time in creating duplicates of data that needs to be send to multiple subscribers

Rgds

Arun

We are thinking of adding a custom change to the pubsubengine whereby publishes to a particular node will be understood to be a multi publish.

The payload will have the data which will be extracted and the engine will make a call to send the actual data to mutiple nodes using the same call it currntly uses

leafNode.publishItems

Would this be fine?

I am still not sure of what problem you are trying to solve here, is it simply a scalability issue for a large number of subscribers? Perhaps some more details of your actual problem would help (actual numbers of subscribers and the like).

I do know of one bottleneck with delivery, which is the single threaded nature of the publish. This would require a patch to use a thread pool for event delivery.

As for your proposed solution. It seems like a hack, I think if you want to customize the server, I would try to increase throughput on a single node, not make it automagically publish to multiple. In fact, you don’t have to build a custom server for that purpose, you can simply write a plugin (a PacketInterceptor) to add that functionality. One of the nice things about plugins is that you can go a long way to customize the servers behaviour since you have access to all the servers internal API’s.