Mule JMS ActiveMQ 传输失败到故障转移

Posted

技术标签:

【中文标题】Mule JMS ActiveMQ 传输失败到故障转移【英文标题】:Mule JMS ActiveMQ Transport Failing to Failover 【发布时间】:2014-04-27 16:30:35 【问题描述】:

设置:

运行 CE-3.4.0 的 Mule Studio 3.5 activemq-all-5.9.0.jar 在我的构建路径中。 MQ 服务器是 Apollo ActiveMQ 1.7

我正在尝试将 ActiveMQ 的故障转移协议与 Mule 和两个 Apollo ActiveMQ 服务器一起使用。如果我关闭其中一个 ActiveMQ 服务器,Mule 将不会像我预期的那样将连接故障转移到第二个 MQ 服务器。

我已经尝试过在 ActiveMQ 连接器上使用和不使用重新连接策略。

 <?xml version="1.0" encoding="UTF-8"?>

 <mule xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:jms="http://www.mulesoft.org/schema/mule/jms" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
    xmlns:spring="http://www.springframework.org/schema/beans" version="CE-3.4.0"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:context="http://www.springframework.org/schema/context"
     xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
 http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
 http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
 http://www.mulesoft.org/schema/mule/jms http://www.mulesoft.org/schema/mule/jms/current/mule-jms.xsd
 http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
     <context:property-placeholder location="properties" />
     <jms:activemq-connector name="Active_MQ" username="$mq.user" password="$mq.password" brokerURL="failover:(tcp://mq-szt-1:61613,tcp://mq-szt-2:61613)" validateConnections="true" doc:name="Active MQ">
         <reconnect/>
     </jms:activemq-connector>
     <jms:activemq-connector name="Active_MQ_1" username="$mq.user" password="$mq.password" brokerURL="tcp://mq-szt-1:61613" validateConnections="true" doc:name="Active MQ 1 "/>
     <jms:activemq-connector name="Active_MQ_2" username="$mq.user" password="$mq.password" brokerURL="tcp://mq-szt-2:61613" validateConnections="true" doc:name="Active MQ 2"/>
     <flow name="activemqtestingFlow1" doc:name="activemqtestingFlow1">
         <http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8084" doc:name="HTTP"/>
         <jms:outbound-endpoint queue="amq" connector-ref="Active_MQ" doc:name="JMS"/>
         <echo-component doc:name="Echo"/>
     </flow>
     <flow name="activemqtestingFlow2" doc:name="activemqtestingFlow2">
         <composite-source doc:name="Composite Source">
             <jms:inbound-endpoint queue="amq" connector-ref="Active_MQ_1" doc:name="JMS"/>
            <jms:inbound-endpoint queue="amq" connector-ref="Active_MQ_2" doc:name="JMS"/>
         </composite-source>
         <echo-component doc:name="Echo"/>
     </flow>
 </mule>

如果两个 MQ 服务器都已启动,则通过工作发送消息...

 INFO  2014-03-20 08:51:20,833 [main] org.mule.module.launcher.MuleDeploymentService: 
 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 + Started app 'activemqtesting'                            +
 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 INFO  2014-03-20 08:52:14,877 [[activemqtesting].connector.http.mule.default.receiver.02] org.mule.transport.service.DefaultTransportServiceDescriptor: Loading default outbound transformer: org.mule.transport.jms.transformers.ObjectToJMSMessage
 INFO  2014-03-20 08:52:14,878 [[activemqtesting].connector.http.mule.default.receiver.02] org.mule.transport.service.DefaultTransportServiceDescriptor: Loading default response transformer: org.mule.transport.jms.transformers.ObjectToJMSMessage
 WARN  2014-03-20 08:52:14,878 [[activemqtesting].connector.http.mule.default.receiver.02] org.mule.transport.jms.JmsMessageDispatcher: Starting patched JmsMessageReceiver
 INFO  2014-03-20 08:52:14,878 [[activemqtesting].connector.http.mule.default.receiver.02] org.mule.lifecycle.AbstractLifecycleManager: Initialising: 'Active_MQ.dispatcher.362048839'. Object is: JmsMessageDispatcher
 INFO  2014-03-20 08:52:14,879 [[activemqtesting].connector.http.mule.default.receiver.02] org.mule.lifecycle.AbstractLifecycleManager: Starting: 'Active_MQ.dispatcher.362048839'. Object is: JmsMessageDispatcher
 INFO  2014-03-20 08:52:15,109 [[activemqtesting].connector.http.mule.default.receiver.02] org.mule.component.simple.LogComponent: 
 ********************************************************************************
 * Message received in service: activemqtestingFlow1. Content is: '/test1'      *
 ********************************************************************************
 INFO  2014-03-20 08:52:15,198 [[activemqtesting].activemqtestingFlow2.stage1.02] org.mule.component.simple.LogComponent: 
 ********************************************************************************
 * Message received in service: activemqtestingFlow2. Content is: '/test1'      *
 ********************************************************************************
 INFO  2014-03-20 08:52:15,737 [[activemqtesting].connector.http.mule.default.receiver.02] org.mule.component.simple.LogComponent: 
 ********************************************************************************
 * Message received in service: activemqtestingFlow1. Content is:               *
 * '/favicon.ico'                                                               *
 ********************************************************************************
 INFO  2014-03-20 08:52:15,744 [[activemqtesting].activemqtestingFlow2.stage1.02] org.mule.component.simple.LogComponent: 
 ********************************************************************************
 * Message received in service: activemqtestingFlow2. Content is:               *
 * '/favicon.ico'                                                               *
 ********************************************************************************

在 mq-szt-2 上,我看到 en-queue 和 de-queue 计数器已增加,因此我停止了 mq-szt-2 上的 ActiveMQ 服务。我希望 Mule 能够故障转移到 mq-szt-1,但传输失败了。当我尝试通过我发送其他消息时,出现“无法传输”错误。下面的骡子错误...

 WARN  2014-03-20 08:52:33,287 [ActiveMQ Transport: tcp://mq-szt-2./10.0.0.43:61613@21348] org.apache.activemq.transport.failover.FailoverTransport: Transport (tcp://10.0.0.43:61613) failed, reason:  java.net.SocketException: Connection reset, attempting to automatically reconnect
 ERROR 2014-03-20 08:52:33,291 [ActiveMQ Connection Executor: tcp://mq-szt-2./10.0.0.43:61613@21350] org.mule.exception.DefaultSystemExceptionStrategy: 
 ********************************************************************************
 Message               : Connection reset (javax.jms.JMSException)
 Code                  : MULE_ERROR--2
 --------------------------------------------------------------------------------
 Exception stack is:
 1. Connection reset (java.net.SocketException)
   java.net.SocketInputStream:-1 (null)
 2. Connection reset(JMS Code: null) (javax.jms.JMSException)
   org.apache.activemq.util.JMSExceptionSupport:54 (http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/jms/JMSException.html)
 3. Connection reset (javax.jms.JMSException) (org.mule.transport.ConnectException)
   org.mule.transport.jms.JmsConnector:508 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/transport/ConnectException.html)
 --------------------------------------------------------------------------------
 Root Exception stack trace:
 java.net.SocketException: Connection reset
     at java.net.SocketInputStream.read(Unknown Source)
    at java.net.SocketInputStream.read(Unknown Source)
     at org.apache.activemq.transport.tcp.TcpBufferedInputStream.fill(TcpBufferedInputStream.java:50)
     + 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything)
 ********************************************************************************

 INFO  2014-03-20 08:52:33,291 [ActiveMQ Connection Executor: tcp://mq-szt-2/10.0.0.43:61613@21350] org.mule.exception.DefaultSystemExceptionStrategy: Exception caught is a ConnectException, attempting to reconnect...
 INFO  2014-03-20 08:52:33,292 [ActiveMQ Connection Executor: tcp://mq-szt-2/10.0.0.43:61613@21350] org.mule.lifecycle.AbstractLifecycleManager: Stopping connector: Active_MQ_2
 INFO  2014-03-20 08:52:33,293 [ActiveMQ Connection Executor: tcp://mq-szt-2/10.0.0.43:61613@21350] org.mule.lifecycle.AbstractLifecycleManager: Stopping: 'null'. Object is: MultiConsumerJmsMessageReceiver
 WARN  2014-03-20 08:52:33,294 [ActiveMQ Connection Executor: tcp://mq-szt-2/10.0.0.43:61613@21350] org.mule.transport.jms.activemq.ActiveMQJmsConnector: Failed to close jms message consumer: Cannot send, channel has already failed: tcp://10.0.0.43:61613
 WARN  2014-03-20 08:52:33,294 [ActiveMQ Connection Executor: tcp://mq-szt-2/10.0.0.43:61613@21350] org.mule.transport.jms.activemq.ActiveMQJmsConnector: Failed to close jms session consumer: Cannot send, channel has already failed: tcp://10.0.0.43:61613
 WARN  2014-03-20 08:52:33,294 [ActiveMQ Connection Executor: tcp://mq-szt-2/10.0.0.43:61613@21350] org.mule.transport.jms.activemq.ActiveMQJmsConnector: Failed to close jms message consumer: Cannot send, channel has already failed: tcp://10.0.0.43:61613
 WARN  2014-03-20 08:52:33,294 [ActiveMQ Connection Executor: tcp://mq-szt-2/10.0.0.43:61613@21350] org.mule.transport.jms.activemq.ActiveMQJmsConnector: Failed to close jms session consumer: Cannot send, channel has already failed: tcp://10.0.0.43:61613
 WARN  2014-03-20 08:52:33,294 [ActiveMQ Connection Executor: tcp://mq-szt-2/10.0.0.43:61613@21350] org.mule.transport.jms.activemq.ActiveMQJmsConnector: Failed to close jms message consumer: Cannot send, channel has already failed: tcp://10.0.0.43:61613
 WARN  2014-03-20 08:52:33,294 [ActiveMQ Connection Executor: tcp://mq-szt-2/10.0.0.43:61613@21350] org.mule.transport.jms.activemq.ActiveMQJmsConnector: Failed to close jms session consumer: Cannot send, channel has already failed: tcp://10.0.0.43:61613
 WARN  2014-03-20 08:52:33,294 [ActiveMQ Connection Executor: tcp://mq-szt-2/10.0.0.43:61613@21350] org.mule.transport.jms.activemq.ActiveMQJmsConnector: Failed to close jms message consumer: Cannot send, channel has already failed: tcp://10.0.0.43:61613
 WARN  2014-03-20 08:52:33,294 [ActiveMQ Connection Executor: tcp://mq-szt-2/10.0.0.43:61613@21350] org.mule.transport.jms.activemq.ActiveMQJmsConnector: Failed to close jms session consumer: Cannot send, channel has already failed: tcp://10.0.0.43:61613
 WARN  2014-03-20 08:52:33,297 [ActiveMQ Connection Executor: tcp://mq-szt-2/10.0.0.43:61613@21350] org.mule.transport.jms.activemq.ActiveMQJmsConnector: Exception cleaning up JMS connection: null
 WARN  2014-03-20 08:52:33,298 [ActiveMQ Connection Executor: tcp://mq-szt-2/10.0.0.43:61613@21350] org.mule.transport.jms.activemq.ActiveMQJmsConnector: Exception closing JMS connection: Connection reset
 INFO  2014-03-20 08:52:33,298 [ActiveMQ Connection Executor: tcp://mq-szt-2/10.0.0.43:61613@21350] org.mule.transport.jms.activemq.ActiveMQJmsConnector: Disconnected: ActiveMQJmsConnector
 
   name=Active_MQ_2
   lifecycle=stop
   this=540f51ab
   numberOfConcurrentTransactedReceivers=4
   createMultipleTransactedReceivers=true
   connected=true
   supportedProtocols=[jms]
   serviceOverrides=<none>
 

 ERROR 2014-03-20 08:52:33,320 [ActiveMQ Connection Executor: tcp://mq-szt-1:61613] org.mule.exception.DefaultSystemExceptionStrategy: 
 ********************************************************************************
 Message               : org.apache.activemq.apollo.openwire.OpenwireProtocolHandler$ProtocolException: Unspported command: class org.apache.activemq.apollo.openwire.command.ConnectionControl (javax.jms.JMSException)
 Code                  : MULE_ERROR--2
 --------------------------------------------------------------------------------
 Exception stack is:
 1. org.apache.activemq.apollo.openwire.OpenwireProtocolHandler$ProtocolException: Unspported command: class org.apache.activemq.apollo.openwire.command.ConnectionControl (java.lang.Throwable)
   org.apache.activemq.apollo.openwire.OpenwireProtocolHandler:346 (null)
 2. org.apache.activemq.apollo.openwire.OpenwireProtocolHandler$ProtocolException: Unspported command: class org.apache.activemq.apollo.openwire.command.ConnectionControl(JMS Code: null) (javax.jms.JMSException)
   org.apache.activemq.util.JMSExceptionSupport:54 (http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/jms/JMSException.html)
 3. org.apache.activemq.apollo.openwire.OpenwireProtocolHandler$ProtocolException: Unspported command: class org.apache.activemq.apollo.openwire.command.ConnectionControl (javax.jms.JMSException) (org.mule.transport.ConnectException)
   org.mule.transport.jms.JmsConnector:508 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/transport/ConnectException.html)
 --------------------------------------------------------------------------------
 Root Exception stack trace:
 java.lang.Throwable: org.apache.activemq.apollo.openwire.OpenwireProtocolHandler$ProtocolException: Unspported command: class org.apache.activemq.apollo.openwire.command.ConnectionControl
     at org.apache.activemq.apollo.openwire.OpenwireProtocolHandler.fail(OpenwireProtocolHandler.scala:346)
    at org.apache.activemq.apollo.openwire.OpenwireProtocolHandler.fail(OpenwireProtocolHandler.scala:343)
     at org.apache.activemq.apollo.openwire.OpenwireProtocolHandler.die(OpenwireProtocolHandler.scala:397)
     + 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything)
 ********************************************************************************

 INFO  2014-03-20 08:52:33,320 [ActiveMQ Connection Executor: tcp://mq-szt-1:61613] org.mule.exception.DefaultSystemExceptionStrategy: Exception caught is a ConnectException, attempting to reconnect...
 INFO  2014-03-20 08:52:33,320 [ActiveMQ Connection Executor: tcp://mq-szt-1:61613] org.mule.lifecycle.AbstractLifecycleManager: Stopping connector: Active_MQ
 INFO  2014-03-20 08:52:33,322 [ActiveMQ Connection Executor: tcp://mq-szt-1:61613] org.mule.lifecycle.AbstractLifecycleManager: Stopping: 'Active_MQ.dispatcher.362048839'. Object is: JmsMessageDispatcher
 INFO  2014-03-20 08:52:33,322 [ActiveMQ Connection Executor: tcp://mq-szt-1:61613] org.mule.lifecycle.AbstractLifecycleManager: Disposing: 'Active_MQ.dispatcher.362048839'. Object is: JmsMessageDispatcher
 WARN  2014-03-20 08:52:38,335 [ActiveMQ Transport: tcp://mq-szt-1/10.0.0.33:61613@21370] org.apache.activemq.transport.failover.FailoverTransport: Transport (tcp://10.0.0.33:61613) failed, reason:  java.net.SocketException: Connection reset, attempting to automatically reconnect
 ERROR 2014-03-20 08:52:45,375 [[activemqtesting].connector.http.mule.default.receiver.02] org.mule.exception.DefaultMessagingExceptionStrategy: 
 ********************************************************************************
 Message               : Cannot process event as "Active_MQ" is stopped
 Code                  : MULE_ERROR-166
 --------------------------------------------------------------------------------
 Exception stack is:
 1. Cannot process event as "Active_MQ" is stopped (org.mule.api.lifecycle.LifecycleException)
   org.mule.lifecycle.processor.ProcessIfStartedMessageProcessor:42 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/lifecycle/LifecycleException.html)
 --------------------------------------------------------------------------------
 Root Exception stack trace:
 org.mule.api.lifecycle.LifecycleException: Cannot process event as "Active_MQ" is stopped
     at org.mule.lifecycle.processor.ProcessIfStartedMessageProcessor.handleUnaccepted(ProcessIfStartedMessageProcessor.java:42)
    at org.mule.processor.AbstractFilteringMessageProcessor.process(AbstractFilteringMessageProcessor.java:48)
     at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:27)
     + 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything)
 ********************************************************************************

 ERROR 2014-03-20 08:52:45,568 [[activemqtesting].connector.http.mule.default.receiver.02] org.mule.exception.DefaultMessagingExceptionStrategy: 
 ********************************************************************************
 Message               : Cannot process event as "Active_MQ" is stopped
 Code                  : MULE_ERROR-166
 --------------------------------------------------------------------------------
 Exception stack is:
 1. Cannot process event as "Active_MQ" is stopped (org.mule.api.lifecycle.LifecycleException)
   org.mule.lifecycle.processor.ProcessIfStartedMessageProcessor:42 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/lifecycle/LifecycleException.html)
 --------------------------------------------------------------------------------
 Root Exception stack trace:
 org.mule.api.lifecycle.LifecycleException: Cannot process event as "Active_MQ" is stopped
     at org.mule.lifecycle.processor.ProcessIfStartedMessageProcessor.handleUnaccepted(ProcessIfStartedMessageProcessor.java:42)
    at org.mule.processor.AbstractFilteringMessageProcessor.process(AbstractFilteringMessageProcessor.java:48)
     at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:27)
     + 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything)
 ********************************************************************************

 ERROR 2014-03-20 08:52:54,303 [ActiveMQ Connection Executor: tcp://mq-szt-2./10.0.0.43:61613@21350] org.mule.retry.notifiers.ConnectNotifier: Failed to connect/reconnect: ActiveMQJmsConnector
 
   name=Active_MQ_2
   lifecycle=stop
   this=540f51ab
   numberOfConcurrentTransactedReceivers=4
   createMultipleTransactedReceivers=true
   connected=false
   supportedProtocols=[jms]
   serviceOverrides=<none>
 
 . Root Exception was: Connection timed out: connect. Type: class java.net.ConnectException
 ERROR 2014-03-20 08:52:54,303 [ActiveMQ Connection Executor: tcp://mq-szt-2./10.0.0.43:61613@21350] org.mule.exception.DefaultSystemExceptionStrategy: Could not connect to broker URL: tcp://mq-szt-2.:61613. Reason: java.net.ConnectException: Connection timed out: connect
 ERROR 2014-03-20 08:52:59,206 [[activemqtesting].connector.http.mule.default.receiver.02] org.mule.exception.DefaultMessagingExceptionStrategy: 

当我尝试通过我发送更多消息时收到此错误:

 ********************************************************************************
 Message               : Cannot process event as "Active_MQ" is stopped
 Code                  : MULE_ERROR-166
 --------------------------------------------------------------------------------
 Exception stack is:
 1. Cannot process event as "Active_MQ" is stopped (org.mule.api.lifecycle.LifecycleException)
   org.mule.lifecycle.processor.ProcessIfStartedMessageProcessor:42 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/lifecycle/LifecycleException.html)
 --------------------------------------------------------------------------------
 Root Exception stack trace:
 org.mule.api.lifecycle.LifecycleException: Cannot process event as "Active_MQ" is stopped
     at org.mule.lifecycle.processor.ProcessIfStartedMessageProcessor.handleUnaccepted(ProcessIfStartedMessageProcessor.java:42)
    at org.mule.processor.AbstractFilteringMessageProcessor.process(AbstractFilteringMessageProcessor.java:48)
     at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:27)
     + 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything)
 ********************************************************************************

 ERROR 2014-03-20 08:52:59,373 [[activemqtesting].connector.http.mule.default.receiver.02] org.mule.exception.DefaultMessagingExceptionStrategy: 
 ********************************************************************************
 Message               : Cannot process event as "Active_MQ" is stopped
 Code                  : MULE_ERROR-166
 --------------------------------------------------------------------------------
 Exception stack is:
 1. Cannot process event as "Active_MQ" is stopped (org.mule.api.lifecycle.LifecycleException)
   org.mule.lifecycle.processor.ProcessIfStartedMessageProcessor:42 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/lifecycle/LifecycleException.html)
 --------------------------------------------------------------------------------
 Root Exception stack trace:
 org.mule.api.lifecycle.LifecycleException: Cannot process event as "Active_MQ" is stopped
     at org.mule.lifecycle.processor.ProcessIfStartedMessageProcessor.handleUnaccepted(ProcessIfStartedMessageProcessor.java:42)
    at org.mule.processor.AbstractFilteringMessageProcessor.process(AbstractFilteringMessageProcessor.java:48)
     at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:27)
     + 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything)
 ********************************************************************************

 WARN  2014-03-20 08:53:04,370 [ActiveMQ Transport: tcp://mq-szt-1/10.0.0.33:61613@21389] org.apache.activemq.transport.failover.FailoverTransport: Transport (tcp://10.0.0.33:61613) failed, reason:  java.net.SocketException: Connection reset, attempting to automatically reconnect

如果我再次启动 mq-szt-2 我会得到这个,它不会重新连接但我会开始在日志中看到这个:

 WARN  2014-03-20 09:00:26,934 [ActiveMQ Transport: tcp://mq-szt-1/10.0.0.33:61613@21669] org.apache.activemq.transport.failover.FailoverTransport: Transport (tcp://10.0.0.33:61613) failed, reason:  java.net.SocketException: Connection reset, attempting to automatically reconnect
 WARN  2014-03-20 09:00:52,954 [ActiveMQ Transport: tcp://mq-szt-1/10.0.0.33:61613@21677] org.apache.activemq.transport.failover.FailoverTransport: Transport (tcp://10.0.0.33:61613) failed, reason:  java.net.SocketException: Connection reset, attempting to automatically reconnect
 WARN  2014-03-20 09:00:58,279 [ActiveMQ Transport: tcp://mq-szt-2/10.0.0.43:61613@21678] org.apache.activemq.transport.failover.FailoverTransport: Transport (tcp://10.0.0.43:61613) failed, reason:  java.net.SocketException: Connection reset, attempting to automatically reconnect
 WARN  2014-03-20 09:01:03,313 [ActiveMQ Transport: tcp://mq-szt-1/10.0.0.33:61613@21679] org.apache.activemq.transport.failover.FailoverTransport: Transport (tcp://10.0.0.33:61613) failed, reason:  java.net.SocketException: Connection reset, attempting to automatically reconnect
 WARN  2014-03-20 09:01:08,340 [ActiveMQ Transport: tcp://mq-szt-2/10.0.0.43:61613@21680] org.apache.activemq.transport.failover.FailoverTransport: Transport (tcp://10.0.0.43:61613) failed, reason:  java.net.SocketException: Connection reset, attempting to automatically reconnect
 WARN  2014-03-20 09:01:13,358 [ActiveMQ Transport: tcp://mq-szt-1/10.0.0.33:61613@21683] org.apache.activemq.transport.failover.FailoverTransport: Transport (tcp://10.0.0.33:61613) failed, reason:  java.net.SocketException: Connection reset, attempting to automatically reconnect
 WARN  2014-03-20 09:01:18,387 [ActiveMQ Transport: tcp://mq-szt-2/10.0.0.43:61613@21694] org.apache.activemq.transport.failover.FailoverTransport: Transport (tcp://10.0.0.43:61613) failed, reason:  

【问题讨论】:

【参考方案1】:

没关系。我将 MQ 服务器从 Apollo ActiveMQ 切换到 ActiveMQ,它按预期工作。我相信是因为 Apollo 没有实现 ConnectionControl 命令。 https://issues.apache.org/jira/browse/APLO-270

【讨论】:

以上是关于Mule JMS ActiveMQ 传输失败到故障转移的主要内容,如果未能解决你的问题,请参考以下文章

使用 Mule 重新排队 JMS 请求

Mule 2.2.6 - 处理 JMS 连接丢失的策略

与 Mule/ActiveMQ 和 C++ Stomp 的客户端通信

Mule 在变压器中使用 JMS 连接器

具有接收器线程配置文件配置的 Mule ActiveMQ JMS 组件不起作用

Mule 中的 ActiveMQ 负载均衡