rabbitmq HA集群

发布于 2024-10-01 15:27:36 字数 314 浏览 1 评论 0原文

我想将 RabbitMQ 设置为具有 HA 的两个(或更多)节点集群。

用例:客户端生产者应用程序 (C#.NET) 知道集群有两个节点并发布到集群。各种消费者应用程序(也是 C#.NET)连接到集群并获取生产者生成的所有消息。只要至少一个节点启动并运行,生产者和消费者都将继续工作而不会出现错误。假设节点 A 和 B 正在运行,B 死机一段时间,然后重新启动,然后一段时间后 A 死机,客户端都将继续运行而不会收到错误,因为始终至少有一个节点处于运行状态。

它可以像这样开箱即用吗?

是否还有其他更适合 Windows/.NET 应用程序环境(商业可行)的 MQ?

I am wanting to setup RabbitMQ as a two (or more) node cluster with HA.

Use case: a client producer app (C#.NET) knows that the cluster has two nodes and publishes to the cluster. Various consumer apps (also C#.NET) connect to the cluster and get all messages generated by the producer. So long as at least one node is up and running the producer and consumers will all continue to work without error. Supposing nodes A and B are running and B dies for a while, then gets restarted, then a while later A dies, the clients all continue to function without receiving an error since at all times at least one node is up.

Can it be made to work like this out of the box?

Are there any other MQs that would be more appropriate (commercial ok) for a Windows/.NET application environment?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

薄荷→糖丶微凉 2024-10-08 15:27:36

RabbitMQ v2 .6.0 现在支持使用主动/主动集群的高可用性队列。 Microsoft 和许多其他公司合作开发了 Apache QPid,它具有 C# 绑定,并且还支持主动/主动 HA聚类。

RabbitMQ v2.6.0 now supports high-availability queues using active/active clustering. Microsoft and a number of other companies have collaborated on Apache QPid which has C# bindings and which also supports active/active HA clustering.

骑趴 2024-10-08 15:27:36

它可以像这样开箱即用吗?

不会。当一个节点出现故障时,其所有连接都会关闭。由于 AMQP 连接是有状态的,因此无法解决此问题。您可以实现的是 1) 代理关闭,2) 所有客户端断开连接,3) 客户端连接到其他节点(伪装成原始节点)并且一无所知。

顺便说一句,rabbit 目前不支持主动-主动 HA 集群。它确实支持主动-被动集群逻辑集群(这可能就是您正在寻找的)。

Can it be made to work like this out of the box?

No. When a node goes down, all of its connections are closed. Since AMQP connections are stateful, there's no way around this. What you could achieve is 1) broker goes down, 2) all clients disconnect, 3) clients connect to other node (masquerading as original) and are none the wiser.

On a side note, rabbit does not support active-active HA clustering at the moment. It does support active-passive clustering and a form of logical clustering (which might be what you're looking for).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文