【发布时间】: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 作为联系人发送的特定存在消息?
【问题讨论】: