Author |
Message
|
Vin |
Posted: Wed Sep 11, 2002 5:02 pm Post subject: clearing queues with opprocs set to 1 |
|
|
Master
Joined: 25 Mar 2002 Posts: 212 Location: India
|
I was trying to clear the system.dead.letter.queue since there were some messages sitting in there which I wanted to get rid of. When I issued the command clear qlocal(system.dead.letter.queue) it said the object was in use. I'm planning to set up a cron job to do this but the clear qlocal command fails since there was some process which failed to close this. I know PCF is a way to clear the queues but I really want the clear qlocal command to be working the way I want (should clear irrespective of how many processes are keeping it open). Is there a way? Platform is Solaris 2.8 using MQ 5.2. Thanks very much. |
|
Back to top |
|
 |
bduncan |
Posted: Wed Sep 11, 2002 9:08 pm Post subject: |
|
|
Padawan
Joined: 11 Apr 2001 Posts: 1554 Location: Silicon Valley
|
If you are issuing a clear queue command from runmqsc, there is NO way it will succeed unless both the IPPROCs and OPPROCs on the queue are zero. One way of forcing this condition is to temporarily put or get disable the queue, wait for the value(s) to drop to zero, and then clear the queue, and reenable whatever you disabled. Otherwise you need to use a tool that actually MQGETs all the messages on the queue, to effectively remove them while other applications may have the queue open. _________________ Brandon Duncan
IBM Certified MQSeries Specialist
MQSeries.net forum moderator |
|
Back to top |
|
 |
Vin |
Posted: Wed Sep 11, 2002 9:26 pm Post subject: |
|
|
Master
Joined: 25 Mar 2002 Posts: 212 Location: India
|
Thanks. After put or get disabling the queue do you know how much time will it be before the opprocs and ipprocs variables will get to zero? I wanted to know when these variables will get to zero and what controls it? appreciate it. |
|
Back to top |
|
 |
nimconsult |
Posted: Wed Sep 11, 2002 9:50 pm Post subject: |
|
|
 Master
Joined: 22 May 2002 Posts: 268 Location: NIMCONSULT - Belgium
|
Put-disabling the queue means that any further MQPUT will fail, but it does not clean the open handles (=ipprocs and opprocs). Same comment for get-disabling.
I recommend to use a dead-letter queue handler:
Code: |
runmqdlq <clean.txt |
where clean.txt contains
Code: |
INPUTQ(SYSTEM.DEAD.LETTER.QUEUE) WAIT(NO)
ACTION(DISCARD) |
_________________ Nicolas Maréchal
Senior Architect - Partner
NIMCONSULT Software Architecture Services (Belgium)
http://www.nimconsult.be |
|
Back to top |
|
 |
Vin |
Posted: Thu Sep 12, 2002 8:09 am Post subject: |
|
|
Master
Joined: 25 Mar 2002 Posts: 212 Location: India
|
Thanks so much, that worked. I wanted to know more about this dead letter queue handler and what the contents in the clean.txt file mean? can you point me to some manual where I can read about this? Thanks again. |
|
Back to top |
|
 |
bduncan |
Posted: Thu Sep 12, 2002 11:08 am Post subject: |
|
|
Padawan
Joined: 11 Apr 2001 Posts: 1554 Location: Silicon Valley
|
Nicolas,
I recommended put and get disabling, assuming that the user applications are designed with FAIL_IF_QUIESCING on all MQPUTs and MQGETs, which if true, calls code that gracefully shuts down the application. But alas, in the real world, most applications don't play nice - so definitely the dead letter handler is a nice alternative.
Vin,
The dead letter handler is a program which ships with MQSeries and is a general example of an application that removes messages from the dead letter queue and does something with them. In the trivial case (which you ran) it simply threw the messages away. Depending on the clean.txt file, you can instruct it to do other things, like reroute them, or attempt to put them where they were supposed to go in the first place. You can also write your own dead letter handlers. I believe one of the MQSeries manuals touches on this, and I'm sure there's been a redbook written on it before... _________________ Brandon Duncan
IBM Certified MQSeries Specialist
MQSeries.net forum moderator |
|
Back to top |
|
 |
bower5932 |
Posted: Thu Sep 12, 2002 11:21 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
The System Administration manual gives information on the command and on setting up a rules table to process the messages. |
|
Back to top |
|
 |
|