rabbitmq HA群集

编程入门 行业动态 更新时间:2024-10-15 10:20:44
本文介绍了rabbitmq HA群集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

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

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

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

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?

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

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

推荐答案

可以开箱即用地使它工作吗?

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

不.当节点发生故障时,其所有连接都将关闭.由于AMQP连接是有状态的,因此无法解决.您可以实现的是1)代理崩溃,2)所有客户端断开连接,3)客户端连接到其他节点(伪装成原始节点),但都不是明智的选择.

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.

另一方面,兔子目前不支持主动-主动HA群集.它确实支持主动-被动群集和逻辑聚类(可能正是您所要的).

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).

更多推荐

rabbitmq HA群集

本文发布于:2023-11-24 12:31:44,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1625211.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:rabbitmq   HA

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!