Topic
1 reply Latest Post - ‏2013-04-29T23:48:05Z by GBaddeley
sharpeye500
sharpeye500
5 Posts
ACCEPTED ANSWER

Pinned topic Reset a queue

‏2013-04-29T22:15:02Z |

 

How do i reset a queue? I want to clear all the messages in the queue, before i start to write a message into a queue.

 

MQQueueManager mqQMgr = new MQQueueManager(mqQueueManager);
 MQQueue queue = mqQMgr.AccessQueue(getMessageQueue, MQC.MQOO_OUTPUT | MQC.MQOO_INPUT_SHARED | MQC.MQOO_INQUIRE);
  • GBaddeley
    GBaddeley
    259 Posts
    ACCEPTED ANSWER

    Re: Reset a queue

    ‏2013-04-29T23:48:05Z  in response to sharpeye500

    The correct term is "clear a queue".  You can write a simple program to get all the messages from a queue, or use one of the samples supplied with MQ, such as amqsget, or use the "clear qlocal" runmqsc command, or use one of the many available MQ management tools, such as WMQ Eclipse Explorer (a free SupportPac from IBM, or included in a MQ Server installation)

    HTH, G.