Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Configure WSO2 ESB with Apache ActiveMQ and set up the JMS listener. For instructions, see Configure with ActiveMQ.
  2. Start

    the Apache

    ActiveMQ

    server by executing the following command:

    by navigating to <ACTIVEMQ_HOME/bin> folder and executing ./activemq console(on Linux/OSX) or activemq start(on Windows).

  3. Start

    the WSO2

    ESB

    server by executing the following command:

    by navigating to <ESB_HOME/bin> folder and executing ./wso2server.sh(on Linux/OSX) or wso2server.bat(on Windows).

  4. Create a proxy service with the following configuration.To create a proxy service using ESB Tooling, see Working with Proxy Services via ESB Tooling.

    Code Block
    languagexml
    <proxy xmlns="http://ws.apache.org/ns/synapse" name="JMStoHTTPStockQuoteProxy" transports="jms">
           <target>
               <inSequence>
                   <property action="set" name="OUT_ONLY" value="true"/>
               </inSequence>
               <endpoint>
                   <address uri="http://localhost:9000/services/SimpleStockQuoteService"/>
               </endpoint>
               <outSequence>
                   <send/>
               </outSequence>
           </target>
    </proxy>
  5. To test this you will need an HTTP back-end service. Deploy the SimpleStockQuoteService and start the Axis2 server
  6. Place a message into the Apache ActiveMQ queue by executing the following command from <ESB_HOME>/samples/axis2Client folder.

    Code Block
    languagexml
    ant stockquote -Dmode=placeorder -Dtrpurl="jms:/JMStoHTTPStockQuoteProxy?transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory&java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory&java.naming.provider.url=tcp://localhost:61616&transport.jms.ContentTypeProperty=Content-Type&transport.jms.DestinationType=queue"

...