【问题标题】:Routing to specific XEP-0114 instances backing a single domain in ejabberd?路由到支持 ejabberd 中单个域的特定 XEP-0114 实例?
【发布时间】:2019-04-21 03:14:52
【问题描述】:

我有一个简单的 ejabberd 18.09 设置,在域下运行一个测试组件:test.localhost

配置超级简单:

port: 8888
module: ejabberd_service
hosts:
   "test.localhost":
       password: "secret"

我的 XEP-0114 / XMPP 组件设置可以通过 Procfile 运行多个实例:

test1: ./testcomponent --address localhost:8888 --secret ... --name test.localhost
test2: ./testcomponent --address localhost:8888 --secret ... --name test.localhost
test3: ./testcomponent --address localhost:8888 --secret ... --name test.localhost

现在,当我向test.localhost 下的任何联系人发送消息时,其中一个肯定会收到。那太棒了!似乎对于任何给定的 xmpp 组件,您都可以横向扩展至多个主机和节点,而不必担心单点故障。

有没有办法总是将发送到user1@test.localhost 的消息路由到上面的test1 进程?可能是由 test1 实例以user1@test.localhost 作为联系人发送的特定存在消息?

【问题讨论】:

    标签: xmpp ejabberd


    【解决方案1】:

    您应该使用值为bare_source 的选项“domain_balancing”。它将确保来自给定用户的所有数据包都到达同一组件。 文档在这里:https://docs.ejabberd.im/admin/guide/advanced/

    【讨论】:

    • 太好了,谢谢!听起来路由最终仍取决于 ejabberd,而 domain_balancing 更多的是关于路由到哪个可用组件的建议或种子?这对我来说已经足够好了!
    猜你喜欢
    • 2019-06-04
    • 2014-05-24
    • 2017-08-29
    • 2020-09-13
    • 1970-01-01
    • 1970-01-01
    • 2016-03-30
    • 2018-05-24
    • 2015-08-01
    相关资源
    最近更新 更多