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.  Deleting single or a group of messages on a MQ queue.

    Posted Mon October 25, 2021 12:11 PM
    Is there a way or method to delete individual MQ messages on a queue instead of using MQ Explorer to remove all of them? This is on a Windows 10 server running MQ Server 9.1. 

    Can this be achieved via MQSC commands? I cannot find anything.

    Thanks.


  • 2.  RE: Deleting single or a group of messages on a MQ queue.

    Posted Mon October 25, 2021 12:32 PM
    It depends how you want to choose which messages to remove, but you could take a look at the dmpmqmsg command. It has options for taking messages from a queue and writing them to a file, and let's you get by various IDs (message, correlation, or group) or by hex/ascii/ebcdic search strings.

    ------------------------------
    Matthew Whitehead
    ------------------------------



  • 3.  RE: Deleting single or a group of messages on a MQ queue.

    Posted Wed October 27, 2021 03:13 AM
    Hi Skid,

    With regard to dmpmqmsg, in addition to selecting messages by ID or search strings, it also has a -r parameter providing for a range of messages (select by the sequence in the queue) to be worked on. Take care when using -r that no other applications have the queue open for either input or output, as removal of a message or insertion of a high priority message would affect the message order and potentially lead to the wrong message(s) being deleted.

    Regards,

    ------------------------------
    Neil Casey
    Senior Consultant
    Syntegrity Solutions
    Melbourne, Victoria
    IBM Champion (Cloud) 2019-21
    ------------------------------



  • 4.  RE: Deleting single or a group of messages on a MQ queue.

    Posted Tue October 26, 2021 12:36 PM
    Hi Skid,

    Many MQ tools allow you to selectively delete messages in a queue (just not MQ Explorer).

    Here's a couple of the popular GUI MQ tools that can selectively delete messages in a queue:


    later
    Roger

    ------------------------------
    Roger Lacroix
    CTO
    Capitalware Inc.
    London ON Canada
    ------------------------------



  • 5.  RE: Deleting single or a group of messages on a MQ queue.

    Posted Wed October 27, 2021 05:39 AM

    You may also find the following two links useful reading.

    You cannot delete individual messages using an MQSC command, you only have the CLEAR QLOCAL command which will remove all the messages from the queue.

    Cheers,
    Morag



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



  • 6.  RE: Deleting single or a group of messages on a MQ queue.

    Posted Thu October 28, 2021 09:29 AM
    You can install ms0p support pack . It has an option to delete a specific message

    https://www.ibm.com/support/pages/ms0p-websphere-mq-explorer-%E2%80%93-extended-management-plug-ins-and-tools

    ------------------------------
    Yulia Vaisman
    ------------------------------



  • 7.  RE: Deleting single or a group of messages on a MQ queue.

    Posted Thu October 28, 2021 09:38 AM
    I installed the latest addon msop to MQ Explorer and that appears to work great, also was able to use the dmpmqmsg command to copy the data off of the queues.

    Thanks, I have many options available now!