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 : Quad Channel JMS-to-JMS
The following diagram depicts quad-channel JMS synchronous invocations of the WSO2 ESB.
Â
The following example code shows configuration of WSO2 ESB for quad-channel JMS synchronous invocations.
Example 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& java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory&java.naming.provider.url=tcp://localhost:61616&transport.jms.DestinationType=queue&transport.jms.ReplyDestination=BERes"/> </endpoint> </send> </inSequence> <outSequence> <send/> </outSequence> <target> <parameter name="transport.jms.Destination">ClientReq</parameter> </proxy>
The message flow of the sample code is as follows:
- JMSReplyTo property of JMS message is set to ClientRes. Therefore, the client sends a JMS message to ClientReq queue.
- Next, the transport.jms.ReplyDestination value is set to BERes. This enables the ESB proxy to pick messages from ClientReq queue, and send to BEReq queue.
- Next, the back-end picks messages from the BEReq queue, processes and places response messages to BERes queue.
- Once a response is available in BERes queue, the proxy service picks it and sends back to ClientRes queue.
- Finally, the client picks it as the response message.