MQ

 View Only
  • 1.  MQ Delayed Delivery message format

    Posted Fri October 01, 2021 02:05 PM
    I have written C coded to display the contents of the dead letter queue for our support team.  We have groups starting to use the MQ delayed delivery option where messages go to the SYSTEM.DDELAY.LOCAL.QUEUE then are delivered to the appropriate queue at a later time.  I see the first structure in the message is 'DDH ' which I assume to be the Delayed Delivery Header.

    I have found no documentation in the include files that describes the structure.  Others are described in the cmqc.h include file.  I see the 'DDH ', the version, some hex bytes, the name of the qmgr and the name of the queue.  Can anyone tell me what bytes 9-16 represent?  Examples of just the first part of the DDH header:

    X 4444482001000000BC8187E849CD0500FFFFFFFFFFFFFFFF51 <DDH ........I...........Q>
    X 4444482001000000E7FC8BE849CD0500FFFFFFFFFFFFFFFF51 <DDH ........I...........Q>
    X 4444482001000000A39495E849CD0500FFFFFFFFFFFFFFFF51 <DDH ........I...........Q>
    X 444448200100000036D096E849CD0500FFFFFFFFFFFFFFFF51 <DDH ....6...I...........Q>
    X 44444820010000004D4F9AE849CD0500FFFFFFFFFFFFFFFF51 <DDH ....MO..I...........Q>
    X 4444482001000000F937BBE849CD0500FFFFFFFFFFFFFFFF51 <DDH .....7..I...........Q>
    X 44444820010000002575C0E849CD0500FFFFFFFFFFFFFFFF51 <DDH ....%u..I...........Q>
    X 4444482001000000E629CAE849CD0500FFFFFFFFFFFFFFFF51 <DDH .....)..I...........Q>
    X 4444482001000000CD5FCBE849CD0500FFFFFFFFFFFFFFFF51 <DDH ....._..I...........Q>
    X 444448200100000087A7D5E849CD0500FFFFFFFFFFFFFFFF51 <DDH ........I...........Q>
    X 44444820010000003ED3D6E849CD0500FFFFFFFFFFFFFFFF51 <DDH ....>...I...........Q>

    On the first line, I assume this is either the offset or the time to deliver the message?
    'BC8187E8 49CD0500'.

    Any guidance?

    ------------------------------
    Earle Ake
    ------------------------------


  • 2.  RE: MQ Delayed Delivery message format

    Posted Mon October 04, 2021 05:16 AM
    Hi Earle,

    Yes, bytes 9-16 are the delivery time for the message. I.e. the time the message was originally put plus the delay time.
    Just to be clear are you seeing messages on the DLQ with the DDH header in them? We shouldn't be doing that.

    Regards, Matt.

    ------------------------------
    MATTHEW LEMING
    ------------------------------



  • 3.  RE: MQ Delayed Delivery message format

    Posted Mon October 04, 2021 07:22 AM
    Sorry, was saying I had previously used the DDH header to read dead letter messages but was looking to do similar for the delayed messages. What is the format of bytes 9-16?  Is it milliseconds or microseconds past epoch or what?

    ------------------------------
    Earle Ake
    ------------------------------



  • 4.  RE: MQ Delayed Delivery message format

    Posted Mon October 04, 2021 08:17 AM

    Hi,

    On distributed platforms it is microseconds past the epoch. So in your case Friday, October 1, 2021 12:43:21.054 GMT.

    As its an internal header, and hence not documented, I shouldn't rely on that not changing in future.

    Regards, Matt.



    ------------------------------
    MATTHEW LEMING
    ------------------------------



  • 5.  RE: MQ Delayed Delivery message format

    Posted Mon October 04, 2021 08:23 AM
    Sure, understood.  Thanks for the information!

    ------------------------------
    Earle Ake
    ------------------------------