Use the following links to find out about about how to use message flow monitoring:
In the Web Service Aggregation sample, the footprints of a piece of business data are monitored. Proof is required that the piece of data has passed through the message flows. The <PartNumber> data in the following input message is tracked; in this case, its value is ABC1234.
This piece of data is used to track progress through every message flow that is monitored in all input and all output nodes.
To tie together monitoring events for this piece of business data, the data is used as a parent transaction ID in the monitoring setup.
The sample uses five message flows and is started by putting the previous SOAP XML message to the SOAPInput node of the WSAggregationFanOut.msgflow message flow.
The Event Payload specifies that the business data PartNumber is monitored.
The Parent transaction correlator specifies the PartNumber field from the input message. By specifying the field reference here, and in every other node that is monitored, you can search the resultant events for information that is relevant to ABC1234.
The value ABC1234 is in every business message in the Web Service Aggregation sample, but the field name might not always be the XPATH expression $Root/SOAP/Body/ns:OrderMessage/localElement/PartNumber. You must ensure that the correct XPATH value is specified for each node.
Each of the MQOutput nodes in this message flow, and all input and output nodes in the other four message flows, are configured similarly.
To enable monitoring on your broker for message flows in this sample, enter the following commands:
mqsichangeflowmonitoring myBROKER -c active -e MyEG -f WSAggregationFanOut
mqsichangeflowmonitoring myBROKER -c active -e MyEG -f WSAggregationMQtoSOAP
mqsichangeflowmonitoring myBROKER -c active -e MyEG -f WSAggregationTargetWS
mqsichangeflowmonitoring myBROKER -c active -e MyEG -f WSAggregationSOAPtoMQ
mqsichangeflowmonitoring myBROKER -c active -e MyEG -f WSAggregationFanIn
where myBROKER is your broker name and MyEG is your execution group name.
These commands enable monitoring for all message flows except the one that processes monitor events (WSAggregationReadMonitordata.msgflow).
Note: Do not enable monitoring for the whole execution group, and do not enable monitoring explicitly for the WSAggregationReadMonitordata.msgflow message flow. Doing so results in this flow looping continually because the Input node emits a monitoring event for every message it processes. This event is then read by the same message flow, generating another event.
To disable monitoring, enter the following command:
mqsichangeflowmonitoring myBROKER -c inactive -e MyEG -j
where myBROKER is your broker name and MyEG is your execution group name.
In WebSphere MQ Explorer, create a topic with the topic string:
$SYS/Broker/myBROKER/Monitoring/MyEG/#
where myBROKER is your broker name and MyEG is your execution group name.
In WebSphere MQ Explorer, create a subscription to the topic created previously, specifying the target destination:
WSAGGREGATIONSAMPLE.MONITOR
An example publication message is shown in the following diagram. The broker name in this case is BROKERV70L, and the execution group name is default:
The WSAggregationReadMonitordata.msgflow message flow processes the monitoring data from the WSAGGREGATIONSAMPLE.MONITOR queue. The queue is read by using an MQInput node. A Collector node downstream of the MQInput node specifies the business data, (parent transaction ID) as the correlation identifier.
In the Collector node, the correlation path is set to $Root/XMLNSC//@*[local-name()='parentTransactionId'] so that all monitor event messages for which attribute parentTransactionId has a common value, are captured into a single collection.
When all events for a piece of business data have been read, a summary message is written to the businessdata.xml file. An example output file ABC1234.xml is shown in the following diagram: