All docs This doc
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

This section describes how to configure the ESB's JMS inbound protocol with WSO2 Message Broker (WSO2 MB).


When you configure WSO2 ESB’s JMS inbound protocol with WSO2 MB, the recommended version of WSO2 MB to be used is WSO2 MB 3.0.0. We do not recommend the use of WSO2 MB 2.2.0 or lower.

Follow the steps below to configure the JMS inbound protocol with WSO2 MB 3.0.0

Setting up WSO2 MB

  1. Download and install WSO2 MB. For instructions on how to download and install WSO2 MB, see Getting Started with WSO2 MB
    The unzipped WSO2 MB distribution folder will be referred to as <MB_HOME> throughout the documentation.


    It is not possible to start multiple WSO2 products with their default configurations simultaneously in the same environment. Since all WSO2 products use the same port in their default configuration, there will be port conflicts. Therefore, to avoid port conflicts, apply a port offset in the  <MB_HOME>/repository/conf/carbon.xml  file by changing the offset value to 1. For example,

       <!-- Ports offset. This entry will set the value of the ports defined below to
     the define value + Offset.
     e.g. Offset=2 and HTTPS port=9443 will set the effective HTTPS port to 9445
  2. Open a command prompt (or a shell in Linux) and go to the <MB_HOME>\bin directory.
  3. Start the Message Broker by executing sh (on Linux/OS X) or wso2server.bat (on Windows).

Setting up WSO2 ESB

  1. If you have not already done so, see Getting Started with WSO2 ESB for details on installing and running WSO2 ESB.
  2. Configure the JMS inbound listener. Following is a sample JMS inbound listener configuration:

    <inboundEndpoint xmlns="" name="jms" sequence="request" onError="fault" protocol="jms" suspend="false">
             <parameter name="interval">1000</parameter>
             <parameter name="transport.jms.CacheLevel">1</parameter>
             <parameter name="transport.jms.ConnectionFactoryJNDIName">TopicConnectionFactory</parameter>
             <parameter name="sequential">true</parameter>
             <parameter name="java.naming.factory.initial">org.wso2.andes.jndi.PropertiesFileInitialContextFactory</parameter>
             <parameter name="java.naming.provider.url">repository/conf/</parameter>
             <parameter name="transport.jms.SessionAcknowledgement">AUTO_ACKNOWLEDGE</parameter>
             <parameter name="transport.jms.SessionTransacted">false</parameter>
             <parameter name="transport.jms.ConnectionFactoryType">topic</parameter>

    For more information on the JMS configuration parameters used in the code segments above, see JMS Connection Factory Parameters.

  3. Copy the following JAR files from the <MB_HOME>/clent-lib folder to <ESB_HOME>/repository/components/lib folder.
    • andes-client-3.0.1.jar
    • geronimo-jms_1.1_spec-1.1.0.wso2v1.jar
    • org.wso2.securevault-1.0.0-wso2v2.jar
  4. Open <ESB_HOME>/repository/conf/ file and make a reference to the running Message Broker as specified below:
    • Use carbon as the virtual host.

    • Define a queue named JMSMS.
    • Comment out the topic, since it is not required in this scenario. However, in order to avoid getting the javax.naming.NameNotFoundException:TopicConnectionFactory exception during server startup, make a reference to the Message Broker from the TopicConnectionFactory as well. 

      For example:

      # register some connection factories
      # connectionfactory.[jndiname] = [ConnectionURL]
      connectionfactory.QueueConnectionFactory = amqp://admin:[email protected]/carbon?brokerlist='tcp://localhost:5673'
      connectionfactory.TopicConnectionFactory = amqp://admin:[email protected]/carbon?brokerlist='tcp://localhost:5673'
      # register some queues in JNDI using the form
      # queue.[jndiName] = [physicalName]
      queue.StockQuotesQueue = StockQuotesQueue
  5. Ensure that WSO2 Message Broker is running, and then open a command prompt (or a shell in Linux) and go to the <ESB_HOME>\bin directory.
  6. Start the ESB server by executing sh (on Linux/OS X) or wso2server.bat (on Windows).

Now you have an instance of WSO2 Message Broker and a WSO2 ESB inbound endpoint configured, up and running.


  • No labels