Recently I came across a client issue where a given patch was not doing what they want. I looked into the problem and here what went wrong and how that was resolved.
WSO2 ESB has a production ready JMS transport which is used by several customers. One of them use WSO2 ESB 2.0.1 with IBM MQ version 6.0. One day morning an issue was raised that JMS transport was not re-connecting after the broker went offline and comes online.
Ideally JMS transport should re-connect when the broker become available. Instead of this JMS transport logs the same exception repeatedly. The result is the storage is get filled up with unnecessary logs and the system runs out of space.
JMS transport was improved to log the exception following the same rate as re-connecting logic. The re-try logic is a simple series which double the previous value, which starts with an initial value of 10 seconds. So the time series will be;
10, 20, 40, 80, 160 (s) etc..
This patch which also has the re-connecting logic was tested with following JMS providers and received the given results.
IBM MQ version 6.0 - Re-connection FAILED.
IBM MQ version 7.0 - Re-connected.
ActiveMQ 5.3.1 - Re-connected.
When I look around I found that the IBM MQ version 6.0 has a bug in the notification mechanism of JMS broker failure. Check the bug report for more information. If you take a look at the section 4.3.8 of JMS specification, that specifies how the broker should notify any connection related problem. IBM MQ version 6.0.0 was lacking with this feature. But they have issued a patch which we can use to patch the IBM MQ JMS client jars.
Just follow the instructions and install the upgrade. It's always recommended to upgrade to the newest version ( 6.0.2.5). Once the upgrade is done replace the old MQ client jars(com.ibm.mq.jar, fscontext.jar, com.ibm.mqjms.jar, providerutil.jar, connector.jar, dhbore.jar) with new ones(can be found in $MQ_INSTALL_DIR/Java/lib).
Once this is done start WSO2 ESB with the following options also given by the patch.
wso2server.bat -DuseSynapseXML -DactivateExceptionListener=true
This should avoid the re-connecting problem of JMS transport.
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment