ActiveMQ failover with temporary queues on a network of brokers?

十年热恋 提交于 2020-01-06 15:01:33

问题


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

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.

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.

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.

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

Can anyone explain why this would happen and how I can prevent it?


回答1:


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.



来源:https://stackoverflow.com/questions/29750189/activemq-failover-with-temporary-queues-on-a-network-of-brokers

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!