Versions Compared

Key

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

...

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

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

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

JMS Synchronous Invocations : Quad Channel JMS-to-JMS

Image Added

 

Diagram 5 : Quad-channel JMS synchronous invocations

 

The following example code shows configuration of WSO2 ESB for quad-channel JMS synchronous invocations.

 

 

 

Code Block
languagehtml/xml
titleExample Code 5
<proxy name="QuadJMS" transports="jms">
      <target>
          <inSequence>
              <property action="set" name="transport.jms.ContentTypeProperty" value="Content-Type" scope="axis2"/>
              <send>
                  <endpoint>
                      <address uri="jms:/BEReq?transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory&amp;                 java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory&amp;java.naming.provider.url=tcp://localhost:61616&amp;transport.jms.DestinationType=queue&amp;transport.jms.ReplyDestination=BERes"/>
                  </endpoint>
              </send>
          </inSequence>
          <outSequence>
              <send/>
          </outSequence>
      <target>
      <parameter name="transport.jms.Destination">ClientReq</parameter>
</proxy>