Hi all,
I think I found a bug in the routing policy. In the documentation of RoutingTableImpl.routeToBareJID method (http://fisheye.igniterealtime.org/browse/openfiregit/src/java/org/jivesoftware/o penfire/spi/RoutingTableImpl.java?r=128395c93ed2ad541ec1e0b1efafaaba66541f5f&r=1 28395c93ed2ad541ec1e0b1efafaaba66541f5f#to518) is stated:
In the case that the user is connected from many resources the logic will be the
following:
* Select resources with highest priority
* Select resources with highest show value (chat, available, away, xa, dnd)
* Select resource with most recent activity
But I think that under the following circumstances we send the message to a random resource even if it has a negative priority:
- Let's say we have 2 sessions (so 2 different resources jid@of.org/A and jid@of.org/B)
- session.isMessageCarbonsEnabled() is null for both
- the route.all-resources variable is set to false or null
- the two resources have the same show value
- the two resources have 2 different priorities -1 and 1
So under the above circumstances we never check the resource priority but only the resource with the most recent activity, hence if the resource with -1 was had the last activity we will send messages to it.
I hope everything is clear and I didn't misunderstand something.
Thank you,
Antonio