Openfire server, multiple connection, route.all-re

2019-04-13 17:33发布

问题:

We use http-bind with BOSH and Openfire (3.8.2) as backend and Strophe library (JS) on frontend for our chat application.

Every user gets a specified unique resource by connection. That means, that a user can be logged in different devices/browsers at once (multiple connection, e.g user@example.com/resource1, user@example.com/resource2 etc.). Ideally, we want messages to be sent to all connected resources.

We set route.all-resources setting="true" and the connection priority is equal for all user resources, but behavior hasn't changed at all (chat messages received only last connected user resource).

Could anybody suggest solutions or ideas to solve this issue?

Thanks

回答1:

You may need either route.all-resources or route.really-all-resources

route.really-all-resources = true will send message to all sessions with a non-negative priority route.all-resources = true will send messages to all sessions that share the highest non-negative priority

The source for this is at https://github.com/igniterealtime/Openfire/blob/master/src/java/org/jivesoftware/openfire/spi/RoutingTableImpl.java#L567