rabbitmq HA集群
我想将 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
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.
不会。当一个节点出现故障时,其所有连接都会关闭。由于 AMQP 连接是有状态的,因此无法解决此问题。您可以实现的是 1) 代理关闭,2) 所有客户端断开连接,3) 客户端连接到其他节点(伪装成原始节点)并且一无所知。
顺便说一句,rabbit 目前不支持主动-主动 HA 集群。它确实支持主动-被动集群和逻辑集群(这可能就是您正在寻找的)。
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).