I have multiple messages in the SYSTEM.ADMIN.STATISTICS.QUEUE. Should I use the destructive read property to clear the queue?
Please refer to this link for details
Here are the key parts:
Can you delete messages from the WebSphere MQ SYSTEM.ADMIN.ACCOUNTING.QUEUE or SYSTEM.ADMIN.STATISTICS.QUEUE?
In general, you should not delete messages from any of the WebSphere MQ SYSTEM.* queues.
a) The sample monitoring utility "amqsmon" can be used to get the messages from the queues and display the information contained in the messages. The default mode is to do a destructive "get" of these messages and thus, this would clear up the messages from those queues.
b) Restart the queue manager: the messages in the SYSTEM.ADMIN.* queues are non-persistent, which means, that they do not survive a restart of the queue manager.
You could use runmqsc to CLEAR the messages from these 2 queues and if very careful, you will not damage the configuration.
CAVEAT: Be very careful not to make a typo and accidentally delete the contents of other SYSTEM queues. Otherwise you may corrupt the queue manager and then you may have to delete the entire queue manager and then recreate it.
In case the CLEAR command fails (such as reporting that the queue has been opened by another process), then you could use the following sample program, which will get every message from the queue (in a destructive get mode):
amqsget SYSTEM.ADMIN.STATISTICS.QUEUE QueueManager
The SYSTEM.ADMIN.ACCOUNTING.QUEUE and SYSTEM.ADMIN.STATISTICS.QUEUE are used by the monitoring feature introduced in WebSphere MQ V6. If monitoring is enabled, then accounting and statistics messages are placed on these queues. These messages are generated at the end of the queue manager accounting and statistics interval, and when the reset queue manager statistics command is issued via runmqsc:
RESET QMGR TYPE(STATISTICS)
If you notice that there are messages on these queues, this indicates that the queue manager accounting, or the statistics monitoring feature of MQ has been enabled.
You can disable the queue manager accounting or the statistics monitoring features using runmqsc commands. Example:
ALTER QMGR ACCTQ(OFF) STATQ(OFF)