Author |
Message
|
Gideon |
Posted: Tue Dec 17, 2013 10:29 am Post subject: Clearing Queues |
|
|
Chevalier
Joined: 18 Aug 2009 Posts: 403
|
I have an unusual situation (I use WMQ 7.5)
I have about 8 to 9 QM's that contain about 190 queues.
I need to clear these queues, both in the very near term and repeatedly in the future
Is there any tool or mechanism that would allow the cleearing of all queues within a QM |
|
Back to top |
|
 |
JosephGramig |
Posted: Tue Dec 17, 2013 11:07 am Post subject: |
|
|
 Grand Master
Joined: 09 Feb 2006 Posts: 1244 Location: Gold Coast of Florida, USA
|
Clearly, you would only want to clear certain queues and not all queues.
You could use many Support Pacs to do this. MA0T TestMsg could certainly be used to run a script to read and discard messages. You could even run it from one machine to get them all (assuming you had access).
I would put a lot more thought into what you are saying you want to do... |
|
Back to top |
|
 |
smdavies99 |
Posted: Tue Dec 17, 2013 11:43 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
JosephGramig wrote: |
I would put a lot more thought into what you are saying you want to do... |
For exmple, If you decide to clear a queue and while that is happening what happens if someone writes and commits a message to that queue during the clear process?
An alternative might be to make the writes set an expiry time on the messages. Then they become pretty well self managing. I do this all the time and it works a treat. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
RogerLacroix |
Posted: Tue Dec 17, 2013 2:05 pm Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
|
Back to top |
|
 |
SAFraser |
Posted: Tue Dec 17, 2013 2:44 pm Post subject: |
|
|
 Shaman
Joined: 22 Oct 2003 Posts: 742 Location: Austin, Texas, USA
|
For low level development environments where we have no trading partner connections to consume the messages we produce, we routinely create queues with a "depth" trigger that executes a modified version of amqsget. |
|
Back to top |
|
 |
SAFraser |
Posted: Tue Dec 17, 2013 2:54 pm Post subject: |
|
|
 Shaman
Joined: 22 Oct 2003 Posts: 742 Location: Austin, Texas, USA
|
Oh, and we also have exception and backout messages in low level dev environments, in queues without consumers. We set the DESCR on these queues with a key word, and then we run a shell script via cron that clears matching queues using a modified version of amqsget.
If developers or testers need for such messages to be spared in the weekly purge exercise, we simply change the DESCR in the queue. |
|
Back to top |
|
 |
|