mq_clearq -- Utility to delete all messages from a queue
mq_clearq -qmgr "queue manager" -qname "queue name" [ -debug | -nodebug ]
mq_clearq is a utility to delete all messages from an application-specific queue.
This should only be used in exceptional circumstances: if you don not care about your messages,
you should be using non-peristent expiring messages,
or avoid MQ altogether.
MQ administrators can clear a queue more quickly with MQSC or PCF commands. This script allows non-admin users, who just have message get authority on a queue, to get rid of the messages.
mq_clearq is running,
it prints a dot for every 100 messages it removes from the queue.
Typically message deletion speed using the MQ client (TCP/IP) API is about 200 messages per second.
mq_clearq has two required options:
The name of the queue manager containing the application-specific queue. Only Unix queue managers are supported, and this utility refuses to run against production queue managers.
The name of the AppName-specific queue.