rabbitmq HA群集 [英] rabbitmq HA cluster

查看:132
本文介绍了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群集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆