Correlating input request and output response aggregation messages

If you want to correlate initial request messages with their combined response messages, you can do so using the ReplyIdentifier in the Properties folder of the response message.

Before you start:

To complete this task, you must have completed the following tasks:

In some cases you might want to correlate aggregation request messages with the combined response message produced by your fan-in flow. The following paragraphs discuss how you can do this:
  • At the beginning of a fan-out flow the CorrelId of a request message is copied to the ReplyIdentifier field in the Properties folder of the message. The ReplyIdentifier value from the request message is then copied by Message broker into the aggregated output message in the same place in the Properties folder. This value will be lost once the message has been processed by the fan-in flow so if you wish to correlate the messages after the completion of the fan-in flow, you must add a compute node and program it to preserve the ReplyIdentifier where it can be interrogated at a later time. The steps in this topic describe the actions you must take to use this method.
  • Alternatively, if you are using WebSphere MQ as your transport protocol for your aggregation flows, you can correlate the initial request message with the combined response message by preserving the MsgId from the input MQMD. However, be aware that when the initial request is processed by the fan-out flow, the MsgId held in the MQMD is lost when the MQMD is removed. Therefore if you want to use the MsgId, you must preserve it during your fan-out flow, and store the information in the message somewhere outside the MQMD. For example, you could specify the MsgId as the CorrelId in the aggregated output message. To do this, add a compute node to your fan-out flow that performs this operation.

To use the first method of correlating aggregation requests and responses complete the following steps:
  1. Ensure a non-zero CorrelId is added to the request message, for example by the sending application or by WebSphere MQ. The CorrelId is then copied to the ReplyIdentifier field in the Properties folder. This value also then gets put into the corresponding aggregated response message as the ReplyIdentifier in its properties folder.
  2. Ensure that before the end of your fan-in flow, you use a compute node to interrogate and store the ReplyIdentifier. It is important to include the compute node within your fan-in flow because the ReplyIdentifier is removed once the flow is completed. If you are using WebSphere MQ as your message transport, you could add a MQMD to messages. When an MQMD is added, the ReplyIdentifier from the Properties folder is automatically copied over to the CorrelId.
Related concepts
Message flows overview
Message flow aggregation
Related tasks
Configuring aggregation flows
Designing a message flow
Creating a message flow
Defining message flow content
Related reference
AggregateControl node
AggregateReply node
AggregateRequest node