Route.all-resources patch

We have the “route.all-resources” flag enabled on our Openfire setup which routes outgoing messages to all resources with the highest priority when a message is sent to the bare JID. (i.e. you are logged in at home and in the office and both have the same priority, the message gets delivered to both places).

We noticed that this is currently not supported in the transports. The transports select the a single resource with the highest priority. The following small change to getJIDWithHighestPriority in TransportSession.java should fix that. We did some testing and it worked well.

Regards,

Henrik

/**

  • Retrieves the JID of the highest priority resource.
  • @return Full JID including resource with highest priority.

*/

public JID getJIDWithHighestPriority() {

// PATCH: do not specify resource to send to if route.all-resources is set

if( JiveGlobals.getBooleanProperty(“route.all-resources”, false) ) {

return new JID(jid.getNode(),jid.getDomain(),null);

}

return new JID(jid.getNode(),jid.getDomain(),highestResource);

}

Hrm. Couple of things.

First off, that will cause -some- problems, because, for example, a probe is meaning to go to the highest resource but instead it might end up giving the transport a lot of responses, which might confuse it. (not sure off the top of my head)

Second of all, if you are only concerned about messages coming from, for example, AIM getting to all of the resources with the top priority, the IM Gateway plugin sends said messages to the bare JID, which -should- follow the rules you have set without a modification to the plugin. Is there a specific transport you are not seeing this work right in?

Aha, I see what’s going on. The transports are implemented improperly. (my fault obviously) See: GATE-423

Thanks folr pointing this out! Should be easy and I’ll get it into 1.2.3.

Ok. Thanks

I’m new to openfire, not seeing where to change the route.all-resources.

I tried adding it under Server Manager & System Properties, added a line for route.all-resources true. This did nothing.

Any help or pointing to some documentation would be great as I can’t find any info on this.

Oh, & I’m on 3.6.0a

route.all-resources sends initial message to all resources, but after it only sends to the one from which i have replied. is there any way to have server contimue to send to all resources?