[英]ActiveMQ: how to balance the load across multiple Message Broker instances?
Just walked through these docs: 刚刚浏览了以下文档:
So, Is it possible to configure Consumer and Producer applications to connect and balance the load between multiple broker instances (in Round Robin or similar way)? 因此,是否可以配置Consumer和Producer应用程序以连接并平衡多个代理实例之间的负载(以Round Robin或类似方式)?
this is what the network of brokers in store and forward mode is designed to do... queues are distributed for load balancing (note: this is not HA however...if a broker goes down, its messages are stuck in the message store until the broker is restarted, need master/slave for HA) 这是存储和转发模式下的代理网络的设计目标。... 分配队列以进行负载平衡(注意:这不是HA,但是...如果代理发生故障,其消息将停留在消息存储中直到代理重新启动,才需要HA的主/从服务器)
if we had broker A, B, C and a publisher on a queue on A. If we have consumers on the queue on A and B then messages for the queue will be spread across both brokers A and B;
如果我们在A和B上的队列中有使用者,则队列A中的消息将在经纪人A和B中传播; some messages going to B, some being consumed on A, none going to C. If a consumer on the queue starts on C, then messages will flow there too.
一些消息发送到B,有些消息在A上使用,而没有消息发送到C。如果队列中的使用者从C开始,那么消息也将在那里流动。 If the consumer stops then no more messages will be dispatched to C.
如果使用者停止,则不会再有消息发送给C。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.