Example 3 - Delivering activity reports to the system queue
Detect when activity reports are delivered to queues other than the reply-to queue and use the IBM MQ display route application to read activity reports from the other queue.
This example is the same as Example 1 - Requesting activity reports, except that QM2 now has the value of the ACTIVREC queue manage attribute set to QUEUE. Channel QM1.TO.QM2 must have been restarted for this to take effect.
This example demonstrates how to detect when activity reports are delivered to queues other than the reply-to queue. Once detected, the IBM MQ display route application is used to read activity reports from another queue.- The message is a trace-route message, therefore the receiving MCA begins to record information about the activity.
- The value of the ACTIVREC queue manager attribute on QM2 is now QUEUE, therefore the MCA generates an activity report, but puts it on the system queue (SYSTEM.ADMIN.ACTIVITY.QUEUE) and not on the reply queue (ACTIV.REPLY.Q).
- Meanwhile DSPMQRTE has been waiting for activity reports to arrive on ACTIV.REPLY.Q. Only two arrive. DSPMQRTE continues waiting for 120 seconds because it seems that the route is not yet complete.
The output that is displayed follows:
AMQ8653: DSPMQRTE command started with options '-m QM1 -q TARG.AT.QM2 -rq ACTIV.REPLY.Q -v outline identifiers'. AMQ8659: DSPMQRTE command successfully put a message on queue 'QM2', queue manager 'QM1'. AMQ8674: DSPMQRTE command is now waiting for information to display. -------------------------------------------------------------------------------- Activity: ApplName: 'cann\output\bin\dspmqrte.exe' Operation: OperationType: Put Message: MQMD: MsgId: X'414D51204C4152474551202020202020A3C9154220001502' CorrelId: X'414D51204C4152474551202020202020A3C9154220001503' QMgrName: 'QM1 ' QName: 'TARG.AT.QM2 ' ResolvedQName: 'QM2 ' RemoteQName: 'TARGET.Q ' RemoteQMgrName: 'QM2 ' -------------------------------------------------------------------------------- Activity: ApplName: 'cann\output\bin\runmqchl.EXE' Operation: OperationType: Get Message: MQMD: MsgId: X'414D51204C4152474551202020202020A3C9154220001505' CorrelId: X'414D51204C4152474551202020202020A3C9154220001502' EmbeddedMQMD: MsgId: X'414D51204C4152474551202020202020A3C9154220001502' CorrelId: X'414D51204C4152474551202020202020A3C9154220001503' QMgrName: 'QM1 ' QName: 'QM2 ' ResolvedQName: 'QM2 ' Operation: OperationType: Send Message: MQMD: MsgId: X'414D51204C4152474551202020202020A3C9154220001502' CorrelId: X'414D51204C4152474551202020202020A3C9154220001503' QMgrName: 'QM1 ' RemoteQMgrName: 'QM2 ' ChannelName: 'QM1.TO.QM2 ' ChannelType: Sender XmitQName: 'QM2 ' -------------------------------------------------------------------------------- AMQ8652: DSPMQRTE command has finished.
- The last operation that DSPMQRTE observed was a Send, therefore the channel is running. Now we must work out why we did not receive any more activity reports from queue manager QM2 (as identified in RemoteQMgrName).
- To check whether there is any activity information on the system queue, start DSPMQRTE on QM2 to try and collect more activity reports. Use the following command to start DSPMQRTE:
dspmqrte -m QM2 -q SYSTEM.ADMIN.ACTIVITY.QUEUE -i 414D51204C4152474551202020202020A3C9154220001502 -v outline
where 414D51204C4152474551202020202020A3C9154220001502 is the MsgId of the trace-route message that was put. - DSPMQRTE then performs a sequence of MQGETs again, waiting for responses on the system activity queue related to the trace-route message with the specified identifier.
- DSPMQRTE gets one more activity report, which it displays. DSPMQRTE determines that the preceding activity reports are missing, and displays a message saying this. We already know about this part of the route, however.
The output that is displayed follows:
AMQ8653: DSPMQRTE command started with options '-m QM2 -q SYSTEM.ADMIN.ACTIVITY.QUEUE -i 414D51204C4152474551202020202020A3C915420001502 -v outline'. AMQ8674: DSPMQRTE command is now waiting for information to display. -------------------------------------------------------------------------------- Activity: Activity information unavailable. -------------------------------------------------------------------------------- Activity: ApplName: 'cann\output\bin\AMQRMPPA.EXE' Operation: OperationType: Receive QMgrName: 'QM2 ' RemoteQMgrName: 'QM1 ' ChannelName: 'QM1.TO.QM2 ' ChannelType: Receiver Operation: OperationType: Discard QMgrName: 'QM2 ' QName: 'TARGET.Q ' Feedback: NotDelivered -------------------------------------------------------------------------------- AMQ8652: DSPMQRTE command has finished.
- This activity report indicates that the route information is now complete. No problem occurred.
- Just because route information is unavailable, or because DSPMQRTE cannot display all of the route, this does not mean that the message was not delivered. For example, the queue manager attributes of different queue managers might be different, or a reply queue might not be defined to get the response back.
Parent topic: IBM MQ display route application examples