MQ

MQ

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  Get specific info from thr messgae

    Posted 03/08/25 05:08 AM

    Hello all,

    I need to extract the message id, time stamp from a specific IBM queue. How can it be done in a simple way ? Is setting mq quemanger tracing a good option. We are  not  expecting too much traffic and this needs to be implemented only in test environment. 

    Thanks

    MADHU



    ------------------------------
    madhu ram
    ------------------------------


  • 2.  RE: Get specific info from thr messgae

    Posted 03/08/25 06:58 AM

    Do you need to extract the message ID and time stamp from a specific message, or from every message that is on your queue?

    The application that gets the message off the queue will be able to read the message ID and the timestamp (Put Time) as it does so. Is that suitable?

    Or if there is no application getting the messages off the queue, you could run the IBM Supplied sample amqsbcg which will browse the messages on the queue and you can see the message ID and Put Time in the output from that sample.

    Alternatively, if your getting application is removing the messages and not reading the message ID and Put Time in the process of doing so and you need a record of them, you could utilise Application Activity Trace to capture them.

    Queue Manager trace would seem unnecessary given the multitude of alternative options above.

    Cheers,
    Morag



    ------------------------------
    Morag Hughson
    MQ Technical Education Specialist
    MQGem Software Limited
    Website: https://www.mqgem.com
    ------------------------------



  • 3.  RE: Get specific info from thr messgae

    Posted 03/08/25 07:33 AM

    Thanks a lot Morag for your reply

    • Yes, I need to extract the fields from every message on the queue
    • We have an application that picks the message. We have an requirement to implement this at the mq level considering a negative  case like the application reading message to be down


    ------------------------------
    madhu ram
    ------------------------------



  • 4.  RE: Get specific info from thr messgae

    Posted 03/08/25 07:46 AM
    Do you need the "message" or the details about the message such as: 1) the app that put the message on the queue,2)  the time that the app put the message on the queue, etc.?

    It sounds like you only need to find out the details of the message, not the internal details surrounding the message.

    For this you need to find out what app is putting the message on the queue and get a description of each field in the message and it's data type (such as integer, text, etc.).

    Susan Barker
    IBM Champion
    Sr. MQ, ACE, ITX Architect








    The contents of this email are intended only for the recipient(s) listed above. If you are not the intended recipient, you are directed not to read, disclose, distribute, or otherwise use this transmission. If you have received this email in error, please notify the sender immediately and delete the transmission. Delivery of this message is not intended to waive any applicable privileges.





  • 5.  RE: Get specific info from thr messgae

    Posted 03/10/25 06:59 PM

    < Vendor_Plug>

    May I suggest you have a look at MQ Auditor as this is one of its use case.  MQ Auditor can track all MQ API calls of a queue manager issued by an application but if you are only interested in gets & puts then you can configure to just track those API calls. The audit data for each API call is written to a CSV file as 1 long line as human-readable information. And if you are not interested in including the message data (payload), you can exclude it. The user can configure what fields are to be included in the audit data.

    This example of an MQPUT1 API call is just 1 long line:

    2024/11/27 19:10:34.980656, MQXF_PUT1, A, PID=7508, TID=4, CC=0, RC=0, UserId=tester, HConn=20971531, OD_ObjName=TEST.Q2, OD_DynamicQNames=AMQ.*, PMO_Options=MQPMO_NO_SYNCPOINT+MQPMO_FAIL_IF_QUIESCING+MQPMO_SYNC_RESPONSE, PMO_ResolvedQMgrName=MQWT2, PMO_ResolvedQName=TEST.Q2, MD_PutDate=2024/11/28, MD_PutTime=00:10:34.98, MD_MsgId=414D51204D5157543220202020202020E4B44767015F0040, MD_Format=MQSTR, MD_MsgType=MQMT_DATAGRAM, MD_Persistence=MQPER_PERSISTENCE_AS_Q_DEF, MD_UserId=tester, BufferLength=23, MsgData=This is a test message.

    < /Vendor_Plug>



    ------------------------------
    Roger Lacroix
    CTO
    Capitalware Inc.
    London Canada
    https://capitalware.com
    ------------------------------