Search code examples
c#.netibm-mq

.net clear IBM mq programatically


Is there anyway to clear the IBM Queue programatically? I want to clear all messages for some queues at a certain time everyday.


Solution

  • You can write a simple program to consume all messages on the queue. If the IPPROCS and OPPROCS are both zero then you can write a program to issue the PCF ClearQ command or the runmqsc ClearQ command. I've written about how to do it and so have other MQ users. Try doing an internet search.