gpt4 book ai didi

rabbitMQ集群VS联邦VS铲

转载 作者:行者123 更新时间:2023-12-05 03:14:42 24 4
gpt4 key购买 nike

我正在不同位置的机器上设置类似“rabbitMQ 集群”的东西,这对 RabbitMQ 集群不利(因为它需要在单个位置使用机器);

所以我在看 rabbitMQ Federation,但它是一个有向的节点网络,如果第一个节点宕机了,它能自动继续写入下一个节点吗?

我的目标是即使某些节点出现故障,日志/数据仍然可以通过不同位置的机器

(我们可以使用 rabbitMQ Federation,让它双向运行吗?比如我们有node1和node2,设node1既是node2的上游又是下游,node2也是node1的上游和下游。所以这就像一个集群,但可以与不同位置的机器一起工作)

最佳答案

if the first node is down, could it automatically move on to write to the next node?

您可以配置 DNS 或负载均衡器并配置规则以重定向流量。例如,如果你配置了一个负载均衡器,你可以使用它的 IP 来配置上游 ip,这样你就可以添加或删除你想要的所有节点。

can we use rabbitMQ Federation, to make it go both direction?

是的,但是你可以阅读 here :

You could have a loop messages

您可以使用max_hops=1 避免循环消息,请阅读here了解更多信息

如果你只想在代理之间复制消息,你的模式也可以用铲子实现。

铲子插件支持多代理连接:

[ "amqp://fred:secret@host1.domain/my_vhost"
, "amqp://john:secret@host2.domain/my_vhost"
]

如果你能读懂 here

If the host is omitted (not valid in a general AMQP URI), the shovel uses a direct connection to the broker in which it is running. This avoids using the network stack.

希望对你有用。

关于rabbitMQ集群VS联邦VS铲,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23566170/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com