The Coordinated Request Reply sample is a message flow sample application based on the scenario of a contemporary and established application communicating through the use of WebSphere MQ or JMS messages in a request/reply processing pattern. The contemporary application uses self-defining XML messages and issues a request message. The established application uses Custom Wire Format (CWF) messages. The application receives a request message, processes it, and delivers a reply message. For the applications to communicate successfully, the message formats must be transformed for both the request and reply messages.
The sample demonstrates how to convert between self-defining XML messages and CWF messages. In addition, the sample demonstrates how to store information in one message flow and retrieve it in another. In the sample, a requirement exists to preserve ReplyToQ and ReplyToQMgr values from the initial request message for use when the corresponding reply message is received. The Coordinated Request Reply Global Cache sample shows how this data can be stored in and retrieved from the global cache. Additionally, Extending the Global Cache Sample describes how this can easily be modified to use an external WebSphere eXtreme Scale grid instead of the embedded global cache. The Coordinated Request Reply MQ sample and Coordinated Request Reply JMS sample show how WebSphere MQ and JMS messages can store the details.
The sample demonstrates how to configure JMS connection properties of the JMS nodes by using a single configurable service. The sample also uses applications and libraries to encapsulate the message flows.
The sample contains one library and four applications, which are shown in the Application Development view, as shown in the following diagram:
The Coordinated Request Reply library contains the following flows and a message set, which are shared by the applications:
The Coordinated Request Reply message set project contains a sample MSET message set with the message definition SaleListMessage. This message set is used to convert the request message from XML format to CWF, and to convert the reply message from CWF to XML. The message set is used by both applications.
The Transform flows contain two subflows, which are used by both applications:
The TransformXMLtoMRM subflow completes the following actions:
The TransformMRMtoXML subflow completes the following actions:
The following applications are included in this sample:
The Coordinated Request Reply MQ application and the Coordinated Request Reply JMS application each consist of three message flows.
This message is read and processed by the Backend Reply message flow, which simulates an established application.
This message is read and processed by the originating application.
The Coordinated Request Reply Global Cache application consists of two message flows.
The Coordinated Request Reply Backend application consists of one message flow:
The message that is sent by the Coordinated Request Global Cache application is read and processed by the Backend Reply message flow, which simulates an established application.
The Backend Reply message flow completes the following actions:
To find out about the processing of message flows for both of the samples, click the following links.
Coordinated Request Reply WebSphere MQ sample
Coordinated Request Reply JMS sample