Enabling applications for trace-route messaging
To enable trace-route messaging for a user application, base your algorithm on the algorithm used by message channel agents (MCAs)
Before you begin
If you are not familiar with the format of a trace-route message, see Trace-route message reference.
Message channel agents (MCAs) are enabled for trace-route messaging. To enable a user application for trace-route messaging, use the following steps from the algorithm that MCAs use:
Procedure
- Determine whether the message being processed is a trace-route message. If the message does not conform to the format of a trace-route message, the message is not processed as a trace-route message.
-
Determine whether activity information is to be recorded.
If the detail level of the performed activity is not less than the level of detail specified by the Detail parameter, activity information is recorded under specific circumstances. This information is only 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 RecordedActivities parameter.
- If activity information is not to be recorded, increment the UnrecordedActivities parameter.
-
Determine whether the total number of activities performed on the trace-route message exceeds the value of the MaxActivities parameter.
The total number of activities is the sum of RecordedActivities, UnrecordedActivities, and DiscontinuityCount.
If the total number of activities exceeds MaxActivities, reject the message with feedback MQFB_MAX_ACTIVITIES.
- If 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, write an Activity PCF group to the end of the PCF block in the message data of a trace-route message.
-
Deliver the trace-route message to a local queue.
- If the parameter, Deliver, is specified as MQROUTE_DELIVER_NO, reject the trace-route message with feedback MQFB_NOT_DELIVERED.
- If the parameter, Deliver, is specified as MQROUTE_DELIVER_YES, deliver the trace-route message to the local queue.
-
Generate a trace-route reply message if all the following conditions are true:
- The trace-route message was delivered to a local queue or rejected
- The value of the parameter, Accumulate, is MQROUTE_ACCUMULATE_AND_REPLY
- The queue manager is enabled for trace-route messaging
- If the trace-route message requested an activity report and the queue manager is enabled for activity recording, generate an activity report. The activity report is put on the queue determined by the ACTIVREC queue manager attribute.