【问题标题】:Camel Consumer not reconnecting when ActiveMQ goes down当 ActiveMQ 宕机时骆驼消费者没有重新连接
【发布时间】:2015-08-03 00:15:45
【问题描述】:

我们有多个消费者连接到一个 ActiveMQ 代理。当 ActiveMQ 关闭或死亡时,消费者也会死亡。有没有办法让它们保持运行并在 ActiveMQ 重新启​​动时自动重新连接?

它还需要使用故障转移。

干杯。

【问题讨论】:

    标签: apache-camel activemq


    【解决方案1】:

    ActiveMQ 通过故障转移传输支持故障转移。 参考:http://activemq.apache.org/failover-transport-reference.html 这是一篇很好的文章,可以解释相同的内容。 http://bsnyderblog.blogspot.co.uk/2010/01/how-to-use-automatic-failover-in.html

    【讨论】:

      【解决方案2】:

      您应该为此使用持久订阅:

          from(activemq:queue:Q.FOO?durableSubscriptionName=TopicReader1&subscriptionDurable=true")
          .to("....");
      

      【讨论】:

        猜你喜欢
        • 2018-08-05
        • 1970-01-01
        • 2013-06-03
        • 2015-08-27
        • 2013-05-23
        • 1970-01-01
        • 1970-01-01
        • 2013-01-24
        相关资源
        最近更新 更多