ActiveMQ无法正常运行的临时队列的故障转移

时间:2015-04-20 15:30:35

标签: jms activemq

我有4个ActiveMQ经纪人

  • 2前端是"链接"彼此
  • 2后端是"链接"彼此

前端经纪人通过桥梁与后端经纪人联系在一起。想象一个正方形,角落处是经纪人。这意味着前端代理只与一个后端代理桥接。 对于应用程序的某些特定部分,我们会请求 - 回复。 我们的方案是,我们有一个连接到前端代理failover:(tcp://localhost:61618,tcp://localhost:61619)的客户端和一个连接到failover:(tcp://localhost:61616,tcp://localhost:61617)的后端代理的应用程序。

在故障转移测试期间,当一个后端代理终止时(很好地,意味着关闭),在终止的代理上创建的临时队列不会在剩余的后端代理上重新创建。

在我们的后端经纪商中,我们将以下属性设置为true advisorySupport="true" cacheTempDestinations="true"

后端的网络连接器如下所示:

<networkConnectors>
            <networkConnector name="broker1QueuesBridge"
                uri="static:(nio://localhost:61617)"
                dynamicOnly="true" decreaseNetworkConsumerPriority="true"
                networkTTL="4">
                <excludedDestinations>
                    <topic physicalName=">" />
                    <queue physicalName="*.out" />
                    <queue physicalName="*.*.out" />
                </excludedDestinations>
            </networkConnector>
            <networkConnector name="broker1TopicsBridge"
                uri="static:(nio://localhost:61617)"
                dynamicOnly="true" decreaseNetworkConsumerPriority="true"
                suppressDuplicateQueueSubscriptions="true" networkTTL="4">
                <excludedDestinations>
                    <queue physicalName=">" />
                </excludedDestinations>
            </networkConnector>
            <networkConnector name="fbroker1Bridge"
                uri="static:(nio://localhost:61618?keepAlive=true)"
                networkTTL="4" dynamicOnly="true">
                <excludedDestinations>
                    <queue physicalName="queue.out" />                           
                </excludedDestinations>
            </networkConnector>
        </networkConnectors>

对于前端,它们的配置如下:

    <networkConnectors>
        <networkConnector name="fbroker2QueuesBridge"
            uri="static:(nio://localhost:61619)"
            dynamicOnly="true" decreaseNetworkConsumerPriority="true"
            networkTTL="4" bridgeTempDestinations="true">
            <excludedDestinations>
                <topic physicalName=">" />
                <queue physicalName="*.out" />
                <queue physicalName="*.*.out" />
            </excludedDestinations>
        </networkConnector>
        <networkConnector name="fbroker2TopicsBridge"
            uri="static:(nio://localhost:61619)"
            dynamicOnly="true" decreaseNetworkConsumerPriority="true"
            suppressDuplicateQueueSubscriptions="true" networkTTL="4" bridgeTempDestinations="true"> 
            <excludedDestinations>
                <queue physicalName=">" />
            </excludedDestinations>
        </networkConnector>
        <networkConnector name="broker1Bridge"
            uri="static:(nio://localhost:61616?keepAlive=true)"
            dynamicOnly="true" networkTTL="4" bridgeTempDestinations="true" >
            <excludedDestinations>
                <queue physicalName="queue.out" />
            </excludedDestinations>
        </networkConnector>
    </networkConnectors>

为什么会发生这种情况?我是否会错过一些配置或者只是没有正确配置?

Thanks in advance.

0 个答案:

没有答案