This documentation is for WSO2 Enterprise Service Bus version 4.9.0 . View documentation for the latest release.

All docs This doc

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Changes related to DOCUMENTATION-4858


The configuration above only includes the mandatory parameters. For some brokers you may have to specify additional parameters. See the following table for the list of configurable parameters:

Parameter NameValueRequired
java.naming.factory.initial Initial Context Factory used to connect to the JMS broker.YES
java.naming.provider.urlUrl of the naming provider to be used by the context factory.YES
store.jms.destinationJNDI Name of the Queue Name that the message store is connecting to.
NO but for some JMS clients this will be needed
store.jms.connection.factoryJNDI name of the Connection factory, which is used to create jms connections.NO but for some JMS clients this will be needed
store.jms.usernameUser Name that is used to create the connection with the broker.NO
store.jms.passwordPassword that is used to create the connection with the broker.NO
store.jms.JMSSpecVersion1.1 or 1.0 JMS API specification to be used (Default 1.1)NO
store.jms.cache.connectiontrue/false Enable Connection cachingNO

Next, let's see a few real-life business use cases of JMS message stores. 

Table of Contents


  1. Define an endpoint that can be used to send the message to the back-end service.

    Code Block
    <endpoint name="SimpleStockQuoteService">
       <address uri=""/>
  2. Create a proxy service that stores messages in the message store you created.

    Code Block
    <proxy name="Proxy2" transports="https,http"
           statistics="disable" trace="disable" startOnLoad="true">
             <property name="FORCE_SC_ACCEPTED" value="true" scope="axis2" />
             <log level="full" />
             <store messageStore="JMSMS" />
  3. Create a sequence to handle the response you receive from the back-end service.

    Code Block
    <sequence name="replySequence">
      <log level="full">
         <property name="REPLY" value="MESSAGE" />
  4. Use the following configuration to create a message forwarding processor that consumes the messages stored in the message store. When compared to the message processor in use case scenario 1 , this has an additional parameter message.processor.reply.sequence that points to a sequence to handle the response message.

    Code Block
    <messageProcessor name="Processor2" class="org.apache.synapse.message.processor.impl.forwarder.ScheduledMessageForwardingProcessor" nametargetEndpoint="Processor2SimpleStockQuoteService" messageStore="JMSMS" xmlns="">
       <parameter name="interval">1000</parameter>
       <parameter name="client.retry.interval">4000<>1000</parameter>
       <parameter name="">4</parameter>
        <parameter name="message.processor.reply.sequence">replySequence</parameter>
       <parameter name="">true</parameter>
       <parameter name="">Disabled</parameter>
       <parameter name="member.count">1</parameter>