Manual cleanup
If you use a broker based subscription store, we can operate the cleanup utility manually from the command line. Here is the syntax of the command:
- For a bindings connection:
Cleanup [-m <qmgr>] [-r <interval>] [SAFE | STRONG | FORCE | NONDUR] [-t]- For a client connection:
Cleanup -client [-m <qmgr>] -host <hostname> [-port <port>] [-channel <channel>] [-r <interval>] [SAFE | STRONG | FORCE | NONDUR] [-t]The parameters of the command are as follows:
- qmgr, hostname, port, and channel enable the cleanup utility to connect to a queue manager.
- -r sets the interval, in minutes, between each run of the cleanup utility. If the parameter is not set, the cleanup utility runs once only.
- -t enables tracing. The output is sent to the file mqjms.trc.
- SAFE, STRONG, FORCE, or NONDUR sets the cleanup level as follows:
- SAFE and STRONG behave like the CLEANUP(SAFE) and CLEANUP(STRONG) modes discussed in Consumer cleanup utility for the publish/subscribe domain.
- FORCE behaves like STRONG mode. But, whereas STRONG mode leaves any messages that cannot be processed on the queue, SYSTEM.JMS.REPORT.QUEUE, FORCE mode deletes all the messages even if it encounters an error during processing.
Warning: This is a dangerous mode that can leave an inconsistent state between the queue manager and the broker. We cannot run the cleanup utility in this mode while any &mqjms; &pubsub; applications are connected to the queue manager. If you try to do so, the cleanup utility ends.- NONDUR behaves like FORCE mode but, in addition, this mode deletes all the messages on queues whose names begin with the characters SYSTEM.JMS.ND. To do this successfully, the command server of the queue manager must be running.
uj25230_