Message route techniques
Activity recording and trace-route messaging are techniques that allow you to record activity information for a message as it is routed through a queue manager network.
- Activity recording
-
If a message has the appropriate report option specified, it requests that applications generate activity reports as it is routed through a queue manager network. When an application performs an activity on behalf of a message, an activity report can be generated, and delivered to an appropriate location. An activity report contains information about the activity that was performed on the message.
The activity information collected using activity reports must be arranged in order before a message route can be determined.
- Trace-route messaging
- Trace-route messaging is a technique that involves sending a trace-route message into a queue manager network. When an application performs an activity on behalf of the trace-route message, activity information can be accumulated in the message data of the trace-route message, or activity reports can be generated. If activity information is accumulated in the message data of the trace-route message, when it reaches its target queue a trace-route reply message containing all the information from the trace-route message can be generated and delivered to an appropriate location.
Because a trace-route message is dedicated to recording the sequence of activities performed on its behalf, there are more processing options available compared with normal messages that request activity reports.
Comparison of activity recording and trace-route messaging
Both activity recording and trace-route messaging can provide activity information to determine the route a message has taken through a queue manager network. Both methods have their own advantages.Benefit | Activity recording | Trace-route messaging |
---|---|---|
Can determine the last known location of a message | Yes | Yes |
Can determine configuration issues with a queue manager network | Yes | Yes |
Can be requested by any message
(is not restricted to use with trace-route messages) |
Yes | No |
Message data is left unmodified | Yes | No |
Message processed normally | Yes | No |
Activity information can be accumulated in the message data | No | Yes |
Optional message delivery to target queue | No | Yes |
If a message is caught in an infinite loop, it can be detected and dealt with | No | Yes |
Activity information can be put in order reliably | No | Yes |
Application provided to display the activity information | No | Yes |
Message route completeness
In some cases it is not possible to identify the full sequence of activities performed on behalf of a message, so only a partial message route can be determined. The completeness of a message route is directly influenced by the queue manager network that the messages are routed through.
MCAs and user-written applications connected to queue managers can record information related to the activities performed on behalf of a message. The recording of activity information is controlled by the queue manager attributes ACTIVREC and ROUTEREC. A queue manager network can determine complete message routes.
How activity information is stored
IBM® MQ stores activity information in activity reports, trace-route messages, or trace-route reply messages. In each case the information is stored in a structure called the Activity PCF group. A trace-route message or trace-route reply message can contain many Activity PCF groups, depending on the number of activities performed on the message. Activity reports contain one Activity PCF group because a separate activity report is generated for every recorded activity.
With trace-route messaging, additional information can be recorded. This additional information is stored in a structure called the TraceRoute PCF group. The TraceRoute PCF group contains a number of PCF structures that are used to store additional activity information, and to specify options that determine how the trace-route message is handled as it is routed through a queue manager network.