Correlation and monitoring events
A monitoring application uses correlation attributes to identify events that belong to the same business transaction.
A business transaction can be any of the following scenarios:
- A single invocation of a message flow.
- Multiple invocations of the same message flow from a parent application. The parent application might be another message flow.
- Multiple invocations of various message flows from a parent application. The parent application might be another message flow.
Three correlation attributes are available for you to use in your events: local correlator, parent correlator and global correlator. The exact usage of the correlation attributes varies depending on the requirements. For example, a parent application can pass its transaction identifier to the child message flow (perhaps in a header) so that the child message flow can report it in the event as a parent correlator.
wmb:eventPointData/wmb:eventCorrelation/@wmb:localTransactionId
wmb:eventPointData/wmb:eventCorrelation/@wmb:parentTransactionId
wmb:eventPointData/wmb:eventCorrelation/@wmb:globalTransactionId
You can specify correlation information when you configure the event.
If you do not specify any correlation information when you configure your events, no correlation attributes will be used.
If you do specify correlation information, you must configure the correlation attributes to be used, and where they will read their value from. Typically you need to specify correlation information only for the first event source in the message flow; by default all later event sources retrieve the same value from the Environment tree.
The locations in the Environment tree used to save correlator values for use by later events are:
Environment.Monitoring.EventCorrelation.localTransactionId
Environment.Monitoring.EventCorrelation.parentTransactionId
Environment.Monitoring.EventCorrelation.globalTransactionId
$Root/MQMD/MsgId
$Root/MQMD/CorrelId
$Root/JMSTransport/Transport_Folders/Header_Values/JMSMessageID
$Root/JMSTransport/Transport_Folders/Header_Values/JMSCorrelationID
$LocalEnvironment/Destination/HTTP/RequestIdentifier
$LocalEnvironment/Wildcard/WildcardMatch
wmb:applicationData/wmb:simpleContent
section
of the event. Scenarios
- The
globalTransactionID
field contains an identifier from the message header or payload. This identifier correlates events from the external process and IBM® Integration Bus. - The
parentTransactionID
correlates events in IBM Integration Bus from different message flows. - The
localTransactionID
correlates events from the same message flow.
parentTransactionID
field
is used to correlate request and reply messages between two message
flows: - The Request flow sends a purchaseOrder request to an external application for processing.
- The Reply flow receives a confirmation reply from the external application when the purchaseOrder has been processed.
You need to correlate the request and replies belonging
to the same purchase order. You can do this by setting the parentTransactionID
to
a field in the purchaseOrder, such as a purchaseOrderID,
which is available in both the request and reply.