ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » clearing queues with opprocs set to 1

Post new topic  Reply to topic
 clearing queues with opprocs set to 1 « View previous topic :: View next topic » 
Author Message
Vin
PostPosted: Wed Sep 11, 2002 5:02 pm    Post subject: clearing queues with opprocs set to 1 Reply with quote

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
View user's profile Send private message
bduncan
PostPosted: Wed Sep 11, 2002 9:08 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website AIM Address
Vin
PostPosted: Wed Sep 11, 2002 9:26 pm    Post subject: Reply with quote

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
View user's profile Send private message
nimconsult
PostPosted: Wed Sep 11, 2002 9:50 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Vin
PostPosted: Thu Sep 12, 2002 8:09 am    Post subject: Reply with quote

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
View user's profile Send private message
bduncan
PostPosted: Thu Sep 12, 2002 11:08 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website AIM Address
bower5932
PostPosted: Thu Sep 12, 2002 11:21 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » clearing queues with opprocs set to 1
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.