applications for trace-route messaging, enabling" />
Enabling applications for trace-route messaging
Message channel agents (MCAs) are enabled for trace-route messaging. The algorithm that MCAs use is detailed below. To enable a user application for trace-route messaging, use this algorithm with the exception of steps 2 and 6.
Note:Enabling a user application for trace-route messaging can be complicated, only enable user applications where necessary.
- Determine whether the message being processed is a trace-route message.
Compare the format of the message with the format of a trace-route message as detailed in Trace-route message reference.
- If the message conforms to the format of a trace-route message, then the algorithm continues to step 2.
- If the message does not conform to the format of a trace-route message, then the message is not processed as a trace-route message.
- If the trace-route message is received from a queue manager prior to WebSphere MQ V6.0, increment the parameter, DiscontinuityCount, in the trace-route message data.
Note:User applications do not perform this step.- Determine whether activity information is to be recorded.
Providing the detail level of the performed activity is not less than the level of detail specified by the parameter Detail, activity information will be recorded if the trace-route message requests accumulation and the queue manager is enabled for trace-route messaging, or if the trace-route message requests an activity report and the queue manager is enabled for activity recording.
- If activity information is to be recorded, increment the parameter RecordedActivities. For information, see RecordedActivities.
- If activity information is not to be recorded, increment the parameter UnrecordedActivities. For information, see UnrecordedActivities.
- Determine whether the total number of activities performed on the trace-route message exceeds the value of the parameter MaxActivities.
The total number of activities is the sum of RecordedActivities, UnrecordedActivities, and DiscontinuityCount.
- If the total number of activities exceeds MaxActivities, then reject the message with feedback MQFB_MAX_ACTIVITIES.
- If the total number of activities does not exceed MaxActivities, then the algorithm continues to step 5.
- If both of the following conditions are true:
- The value of Accumulate is set as MQROUTE_ACCUMULATE_IN_MSG or MQROUTE_ACCUMULATE_AND_REPLY, and
- The queue manager is enabled for trace-route messaging
then write an Activity PCF group to the end of the PCF block in the message data of a trace-route message.
The format of the Activity PCF group is detailed in Activity report message data.
- If delivering the trace-route message to a transmission queue, then follow the algorithm specified in Forwarding.
Note:User applications do not perform this step.- If delivering the trace-route message to a local queue, then do one of the following:
- If the parameter, Deliver, is specified as MQROUTE_DELIVER_NO, then reject the trace-route message with feedback MQFB_NOT_DELIVERED.
- If the parameter, Deliver, is specified as MQROUTE_DELIVER_YES, then deliver the trace-route message to the local queue.
- If all the following conditions are true:
- The trace-route message was delivered to a local queue or rejected, and
- The value of the parameter, Accumulate, is MQROUTE_ACCUMULATE_AND_REPLY, and
- The queue manager is enabled for trace-route messaging
then generate a trace-route reply message.
The format of the trace-route reply message is detailed in Trace-route reply message reference. The trace-route reply message is put on the queue determined by the queue manager attribute, ROUTEREC. For information on this queue manager attribute, see Controlling queue managers for trace-route messaging.
- If the trace-route message requested an activity report and the queue manager is enabled for activity recording, then generate an activity report.
The format of the activity report is detailed in Activity report reference. The activity report is put on the queue determined by the queue manager attribute, ACTIVREC. For information on this queue manager attribute, see Controlling queue managers for activity recording.