I was bemoaning that I dspmqrte did not actually tell me when the message arrived on the queue (COA), and when the application did an MQGET ( message delivered, COD).
I piped the output from the dspmqrte command into a few lines of python and got
AMQ8659I: DSPMQRTE command successfully put a message on queue SYSTEM.CLUSTER.TRANSMIT.QUEUE , queue manager QMA . AMQ8674I: DSPMQRTE command is now waiting for information to display. Put QM:QMA QN:CSERVER RemoteQMName:QMC Get QM:QMA QN:SYSTEM.CLUSTER.TRANSMIT.QUEUE Send QM:QMA RQMN:QMC Chl:CL.QMC ChlT:ClusSdr Receive QM:QMC RQMN:QMA Chl:CL.QMC Discard QM:QMC QN:CSERVER AMQ8652I: DSPMQRTE command has finished.
We can see the message got there because it was discarded.
I changed my back end application to ignore messages with
MsgType :MQMT_DATAGRAM and Format :MQADMIN.
Now with the command
dspmqrte -m QMA -q CSERVER -rq CP0001 -rqm QMA -d yes -v outline -w5 -ro activity,coa,cod
I got additional messages
AMQ8654I: Trace-route message arrived on queue manager QMC .
AMQ8662I: Trace-route message delivered on queue manager QMC .
When I stopped my backend application I got the message arrived – but not the message delivered, as expected.
For a small of work in the application I got a huge improvement in problems diagnostic tools. I was really please with my progress, and had a cup of tea to celebrate.
The title said “but…”. This is because the message arrived, and message delivered are not displayed in real time, but are produced after the time out interval specified in the -w option had expired. I had hoped to use dspmqrte to tell me where the delays were in route to the queue.
So all I can tell is the message got there – but not how long it took. What a wasted opportunity to provide useful information.
So get your applications changed to ignore these trace route messages – and use the -ro COA and COD to tell you if your messages are being processed in a timely manner!
Update.
If you specify the -d yes option the message can be got by your application.
If you then mqput this message to the next application in a sequence of applications, you will get the channel activity for sending it on, and the COA and COD messages sent back when it arrives at each hop.
Unfortunately, the dspmqrte program displays the last COA, and the last COD messages.
I sent the request CSERVER on QMC. The application sent this to queue CP0000 on QMA. The COA and COD message displayed were for QMA. The COA and COD messages do not tell you which queue the event applies to!
One thought on “Buried options to dspmqrte make it more useful, but…”