Openfire服务器,多个连接,route.all-resources不起作用 [英] Openfire server, multiple connection, route.all-resources doesn't work

查看:273
本文介绍了Openfire服务器,多个连接,route.all-resources不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们将http-bind与BOSH和Openfire(3.8.2)一起用作后端,并在聊天应用程序的前端使用Strophe库(JS).

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

每个用户都通过连接获得指定的唯一资源.这意味着,用户可以一次登录到不同的设备/浏览器中(多个连接,例如user@example.com/resource1user@example.com/resource2等).理想情况下,我们希望将消息发送到所有连接的资源.

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.

我们设置route.all-resources setting="true",并且所有用户资源的连接优先级均相等,但是行为完全没有改变(聊天消息仅接收到最后连接的用户资源).

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?

谢谢

推荐答案

您可能需要route.all-resourcesroute.really-all-resources

route.really-all-resources = true将以非负优先级向所有会话发送消息 route.all-resources = true会将消息发送到所有具有最高 非负优先级的会话

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

此代码的来源位于 https://github.com/igniterealtime/Openfire/blob/master/src/java/org/jivesoftware/openfire/spi/RoutingTableImpl.java#L567

这篇关于Openfire服务器,多个连接,route.all-resources不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆