WebSphereMQ Integration using Mule ESB Community Edition


Mule ESB is an open source implementation of an enterprise service bus. In contrast to the free Community Edition, Mule’s commercial Enterprise Edition provides integration of WebSphereMQ servers out of the box. This article explains how to integrate a WebSphereMQ server as a JMS provider by means of the Community Edition.

First, add the following JARs holding the WebSphereMQ client API to Mule’s classpath:

  • com.ibm.mq.jar
  • com.ibm.mqjms.jar
  • dbhcore.jar

These JARs are provided with the installation of your WebSphereMQ server. Alternatively, they can be taken from the free WebSphereMQ client distribution. Note that the client distribution does not support XA transactions. Copy these JARs to


To configure the connection to your WebSphereMQ system, you need to to know the following parameters:

– IP/ host name
– TCP port number
– Name of the Queue manager
– Name of the MQ channel
– User / Password

The Mule JMS connector is set up like this:

   <spring:property name="transportType" value="1"/>
   <spring:property name="hostName" value="localhost"/>
   <spring:property name="port" value="1414"/>
   <spring:property name="channel" value="MY.CHANNEL"/>
   <spring:property name="queueManager" value="MY.QM"/>

To use the namespaces “jms” and “spring” you have to declare them in the root element of your mule-config.xml. Assuming you are using Mule 3.0, it may look like this:

<mule xmlns="http://www.mulesoft.org/schema/mule/core"
       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
       http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/3.0/mule.xsd
       http://www.mulesoft.org/schema/mule/jms http://www.mulesoft.org/schema/mule/jms/3.0/mule-jms.xsd">

Having done this, the WebSphereMQConnector can be used to define JMS endpoints, e.g.

<flow id="MyFlow">
   <inbound-endpoint ref="MyInQueue" />

JMS consumers need at least the GET, INQ and BROWSER privileges for queues they want to read from. A detailed explanation is given here. JMS producers need the PUT privilege.

Conclusion: as long as your queues do not partcipate in XA transactions, the free Community Edition of Mule ESB is sufficient to integrate a WebSphereMQ server as an external JMS provider.

Dipl.-Math. Tobias Trelle is a Senior IT Consultant at codecentric AG in Solingen/Germany. He’s into IT business for nearly 20 years and is interested in software architecture and scalability. Tobias gives talks at conferences and meetups and is the author of the German book “MongoDB: Der praktische Einstieg”.


  • Hassan Hammoud

    4. August 2011 von Hassan Hammoud

    Thanks for this post. It’s very helpful. But can you please tell us what advantages do we get by using the Mule MQ connector of the EE version in comparison to the IBM connector? Thanks

    • Tobias Trelle

      Dear Hassan,

      my solution was applied to the community edition of Mule. I can’t say anything about the WebSphere connector of the enterprise edition of Mule because I don’t use it.

      • Hassan Hammoud

        5. August 2011 von Hassan Hammoud

        Thanks Tobias,

        I have another question though. Few documents are available for the mq client integration I am having a problem with xmlns and xsd to use to validate the jms:connector tag.

  • nben

    Did you connect SIBus (websphere Service Integration bus) from Mule, if you would you please provide the configuration

  • Hassan Hammoud

    17. November 2011 von Hassan Hammoud

    I would like to add that by using com.ibm.mq.jms.MQXAQueueConnectionFactory the connector will be able to handle XA transactions.

  • john_mk

    9. March 2012 von john_mk

    I needed to add “com.ibm.mq.jmqi.jar” to the class path because of a class loading error. Otherwise the above seems to work.

    I´m using the jar´s from MQ Client version

    As a general comment on jms versus the native WMQ connector (as provided with Mule EE) is that you will typically not have access to all properties in the MQ Message header when you use a (the IBM) jms api.

    • Tobias Trelle

      I used a client version 6.x, maybe they moved some of the classes between the jars in version 7.

      Of course you are right w/ the MQ headers. The raw MQI API in general is much broader than the standard JMS API.

  • Enrique

    10. October 2013 von Enrique

    I need to setup these properties in the message:


    I tried this:

    but it seems that is not working.

    Any idea?

    Thanks in advance


Your email address will not be published.