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/.

JMS Synchronous Invocations : Dual Channel HTTP-to-JMS

The following diagram depicts dual-channel JMS synchronous invocations of the ESB.


The following examples show how to configure a WSO2 ESB proxy service for dual-channel JMS synchronous invocations. Examples are provided for WSO2 Message Broker and for ActiveMQ.


The message flow of the sample code is as follows:

  1. The ESB proxy service accepts messages via HTTP and places them in SimpleStockQuoteService JMS queue.
  2. The back-end consumes these messages from the queue and places response messages in the SimpleStockQuoteServiceReply queue.
  3. When a reply is available in the SimpleStockQuoteServiceReply queue, the ESB proxy will pick the response message and send it as the response to the client via HTTP connection.

To send a HTTP message to the ESB proxy service, execute following command from <ESB_HOME>/sample/axis2Client directory. 

ant stockquote -Daddurl=http://localhost:8280/services/StockQuoteProxy -Dsymbol=MSFT

To co-relate request and response JMS messages, the ESB uses a JMS correlation ID internally. For more information, refer to http://www.eaipatterns.com/RequestReplyJmsExample.html. 

Since this is a two-way invocation, the inSequence does not have the configuration <property action="set" name="OUT_ONLY" value="true"/>. 

The response queue name is defined using transport.jms.ReplyDestination parameter in the JMS connection URL.