This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.

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 Current »

This section describes how to configure WSO2 Enterprise Integrator (WSO2 EI) to work as a JMS-to-JMS proxy service.

Follow the steps below to configure WSO2 EI  to  listen to a JMS queue and consume messages and then send those messages to another JMS queue.

  1. Configure WSO2 EI with Apache ActiveMQ and set up the JMS listener and sender. For instructions, see Configure with ActiveMQ.
  2. Create a proxy service with the following configuration.To create a proxy service using ESB Tooling, see Working with Proxy Services via Tooling.

    <proxy name="StockQuoteProxy" transports="jms">
       <target>
           <inSequence>
               <property action="set" name="OUT_ONLY" value="true"/>
               <send>
                   <endpoint>
                      <address uri="jms:/SimpleStockQuoteService?transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory&            java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory&java.naming.provider.url=tcp://localhost:61616"/>
                   </endpoint>
               </send>
           </inSequence>
       </target>
    </proxy>

    When entering the above URLs in the management console, replace '&' character in the endpoint URL with '&amp;'

    In the sample configuration above,  ESB listens to a JMS queue named StockQuoteProxy and sends messages to another queue named SimpleStockQuoteService.

  3. To place a message into a JMS queue, execute following command from <EI_HOME>/samples/axis2Client directory.
ant stockquote -Dmode=placeorder -Dtrpurl="jms:/StockQuoteProxy?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"

You can view the ActiveMQ queues by accessing the ActiveMQ management console using the URL  http://0.0.0.0:8161/admin and using  admin  as both the username and password.

Generally, JMS is used for one-way, asynchronous message exchange. However you can perform synchronous messaging also with JMS. For more information, see JMS Synchronous Invocations : Dual Channel HTTP-to-JMS and JMS Synchronous Invocations : Quad Channel JMS-to-JMS.

  • No labels