具有代理网络上的临时队列的ActiveMQ故障转移? [英] ActiveMQ failover with temporary queues on a network of brokers?

查看:98
本文介绍了具有代理网络上的临时队列的ActiveMQ故障转移?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个由四个经纪人组成的网络,其中两个是前端,另一个是两个后端(我将它们称为FB1 FB2 BB1 BB2)。它们以这样的正方形网络连接:

We have a network of four brokers, 2 "front-end" and 2 "back-end" (I'll refer to them as FB1 FB2 BB1 BB2). They are networked in a square like so:

FB1 .... FB2
 .        .
 .        .
 .        .
BB1 .... BB2

网络连接设置为排除特定队列,否则允许转发所有其他队列和主题。网络连接器在前端和后端之间定义了故障转移,因此,例如,如果BB1掉线,则FB1应该进行故障转移并建立到BB2的新网络连接。

The network connections are set to exclude specific queues but otherwise allow forwarding of all other queues and topics. The network connectors have failover defined between front-end and back-end so if, for example, BB1 went down then FB1 should failover and establish a new network connection to BB2.

连接到每对的客户端也使用故障转移,因此,如果其中一对发生故障,则意味着它们将故障转移到另一对并继续通信。例如,客户端连接到FB1,FB1失败,客户端故障转移到FB2。

Clients connecting to each pair also use failover so that if one of the pair goes down they are meant to failover to the other and continue communication. i.e. client connects to FB1, FB1 fails, client failover to FB2.

在我的问题场景中,客户端向前端代理发送InOut(请求-答复)消息。前端代理将此消息转发到后端代理,在此使用并生成响应。然后,响应将通过临时队列反馈到原始客户端。

In my problem scenario a client sends a InOut (request-reply) message to the front-end brokers. The front-end brokers forward this message to the back-end brokers, where it is consumed and a response generated. The response is then fed back via temporary queues to the original client.

如果在交换期间我杀死了一个代理,则客户端将成功故障转移到其他代理。但是,随后的IntOut(请求-答复)消息失败,并且我看到如下异常:

If i kill one of the brokers during this exchange, then clients failover successfully to the others. However, subsequent IntOut (request-reply) message fail and I see exceptions like:

org.springframework.jms.InvalidDestinationException: Cannot publish to a deleted Destination: temp-queue://I...

有人可以解释为什么这

推荐答案

临时队列未聚集。当您进行请求/答复时,您需要添加一些逻辑以在发生故障转移时为InOut重新创建临时队列-这不会自动发生。

Temporary queues are not clustered. When you do request/reply you need to add some logic that recreate the temp queue for InOut in case of a failover - this does not happen automatic.

这篇关于具有代理网络上的临时队列的ActiveMQ故障转移?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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