0
votes

We are using Mule runtime 3.9.0. In our production environment our Mule application connects to WMQ gateway queue manager. WMQ gateway queue manager is configured on 2 nodes (i.e. active/passive). WMQ switches between both nodes where active nodes changes in time.

Mule configurations for JMS Connector to WMQ GW:

<spring:bean id="MQGatewayConnectionFactory" class="com.ibm.mq.jms.MQQueueConnectionFactory" name="MQGatewayConnectionFactory" scope="singleton"> 
    <spring:property name="transportType" value="1"></spring:property>  
    <spring:property name="connectionNameList" value="${mqm.gw.connectionNameList}"></spring:property>  
    <spring:property name="channel" value="${mqm.gw.channel}"></spring:property>  
    <spring:property name="queueManager" value="${mqm.gw.name}"></spring:property>  
</spring:bean> 

<jms:connector name="WebsphereMQConnector_GW_Adapters" 
       doc:name="WebsphereMQConnector_GW_Adapters" 
       connectionFactory-ref="${MQGatewayConnectionFactory}"
       username="${mqm.user}"  
       validateConnections="true" 
       maxRedelivery="-1" 
       cacheJmsSessions="false" 
       disableTemporaryReplyToDestinations="true" 
       persistentDelivery="true" 
       specification="1.1"> 
    <reconnect-forever frequency="10000"/>  
</jms:connector>

Below configurations properties are used for the above connection:

## MQ GW (for File Adapters)
mqm.gw.connectionNameList=euukteialmq01uf(11414),euukteialmq02uf(11414)
mqm.gw.name=QMUAGW01
mqm.gw.channel=CLIENT.APP.SVRCONN

When WMQ gateway switch the active node, JMS Connector WebsphereMQConnector_GW_Adapters stops, and we get the below error log:

ERROR 2020-10-31 21:31:12,178 [JMSCCThreadPoolWorker-2555] org.mule.exception.DefaultSystemExceptionStrategy:
********************************************************************************
Message               : JMSWMQ1107: A problem with this connection has occurred. (com.ibm.msg.client.jms.DetailedJMSException)
JMS Code              : JMSWMQ1107
Element               : /WebsphereMQConnector_GW_Adapters @ app:af_globals.xml:157 (WebsphereMQConnector_GW_Adapters)
--------------------------------------------------------------------------------
Root Exception stack trace:
com.ibm.mq.MQException: MQ delivered an asynchronous event with completion code '2', and reason '2009'.
    at com.ibm.msg.client.wmq.internal.WMQConnection.consumer(WMQConnection.java:800)
    at com.ibm.mq.jmqi.remote.api.RemoteHconn.callEventHandler(RemoteHconn.java:3132)
    at com.ibm.mq.jmqi.remote.api.RemoteHconn.driveEventsEH(RemoteHconn.java:658)
    at com.ibm.mq.jmqi.remote.impl.RemoteDispatchThread.processHconn(RemoteDispatchThread.java:666)
    at com.ibm.mq.jmqi.remote.impl.RemoteDispatchThread.run(RemoteDispatchThread.java:223)
    at com.ibm.msg.client.commonservices.workqueue.WorkQueueItem.runTask(WorkQueueItem.java:319)
    at com.ibm.msg.client.commonservices.workqueue.SimpleWorkQueueItem.runItem(SimpleWorkQueueItem.java:99)
    at com.ibm.msg.client.commonservices.workqueue.WorkQueueItem.run(WorkQueueItem.java:343)
    at com.ibm.msg.client.commonservices.workqueue.WorkQueueManager.runWorkQueueItem(WorkQueueManager.java:312)
    at com.ibm.msg.client.commonservices.j2se.workqueue.WorkQueueManagerImplementation$ThreadPoolWorker.run(WorkQueueManagerImplementation.java:1227)

********************************************************************************

I know mule should re-attempt and get a connection back to the gateway WMQ queue manager, but it doesn't. And we are forced to restart production Mule nodes.

As per Mule article, this is a known problem and Mule has not fixed this on runtime 3.9.0. Can someone help me with the best way to get this connection working on active-passive WMQ?

1

1 Answers

2
votes

The Knowledge Base article provides you with the answer. Mule 3.9.0 has the issue. The fix is in 3.9.3+. I strongly recommend to migrate to Mule 3.9.4 as the latest and more stable release of Mule 3. Using 3.9.0 you'll keep finding issues already resolved in later bug fix releases. You can find the list of fixes in each version at the release notes:

Alternatively you can create a support case to ask for a patch for this issue for your version.