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 » General IBM MQ Support » How can I clear a queue when is handle by an application.

Post new topic  Reply to topic
 How can I clear a queue when is handle by an application. « View previous topic :: View next topic » 
Author Message
Bracken
PostPosted: Thu Jun 24, 2004 7:00 am    Post subject: How can I clear a queue when is handle by an application. Reply with quote

Novice

Joined: 07 Mar 2003
Posts: 20
Location: México D.F.

Somebody knows if exists some program or application that can clear the messages on queues which is handle by other application.

May be sounds a silly question, but Im really novice on this topics. I will take an MQ Class, but at the moment, I'm need your help.

The novice, again.
Thanks
_________________
SUE
Back to top
View user's profile Send private message Send e-mail
mqonnet
PostPosted: Thu Jun 24, 2004 7:23 am    Post subject: Reply with quote

Grand Master

Joined: 18 Feb 2002
Posts: 1114
Location: Boston, Ma, Usa.

"Somebody knows if exists some program or application that can clear the messages on queues which is handle by other application. "
---As long as other(any) applications dont open this queue, you could very well issue clear qlocal from within runmqsc.

Cheers
Kumar
_________________
IBM Certified WebSphere MQ V5.3 Developer
IBM Certified WebSphere MQ V5.3 Solution Designer
IBM Certified WebSphere MQ V5.3 System Administrator
Back to top
View user's profile Send private message Send e-mail Visit poster's website
dgolding
PostPosted: Thu Jun 24, 2004 7:57 am    Post subject: Reply with quote

Yatiri

Joined: 16 May 2001
Posts: 668
Location: Switzerland

Unfortuanately, clear qlocal from runmqsc will fail if there IS an application that has an open handle(input or output, AFAIK)

PQEDIT or something will help you here, but I've found the easiest way is to rebuild the sample AMQSGET program and change the buffer size to
the largest size of message your site is likely to encounter. Then just fire
it off and let it squirt all those messages into empty space! (Unix fans can
use /dev/null). A little bit dangerous of course if that's not what you
wanted to do

Of course, if someone has opened the queue for exclusive input then the
open from AMQSGET (and any other editor) will fail. Use DIS QSTATUS to
find out who has got the queue open, and then use a variety of means:

polite message
subtle threat
gentle kill
kill -9
get his/her boss to fire them
Back to top
View user's profile Send private message Visit poster's website
JT
PostPosted: Thu Jun 24, 2004 8:21 am    Post subject: Reply with quote

Padawan

Joined: 27 Mar 2003
Posts: 1564
Location: Hartford, CT.

The uitlity RFHUTILC provided in the IH03 supportpac will purge messages from a queue that has outstanding handles opened:
http://www-1.ibm.com/support/docview.wss?rs=203&uid=swg24000637&loc=en_US&cs=utf-8&lang=en
Back to top
View user's profile Send private message
RogerLacroix
PostPosted: Thu Jun 24, 2004 8:42 am    Post subject: Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 3264
Location: London, ON Canada

Hi,

MQ Visual Edit will also handle this situation. You can do a standard delete or issue a Clear Queue command from within MQ Visual Edit. When the user selects the Clear Queue command within MQ Visual Edit, it first checks if anyone has the queue open. If not, it issue a PCF Clear queue command otherwise it removes the messages issuing a destructive gets.

For more info or to download a 30-day trial of MQ Visual Edit, got to:
http://www.capitalware.biz/products.html

Regards,
Roger Lacroix
Capitalware Inc.
_________________
Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter
Back to top
View user's profile Send private message Visit poster's website
HugoB
PostPosted: Mon Jun 28, 2004 4:18 am    Post subject: Reply with quote

Acolyte

Joined: 26 Jun 2001
Posts: 67

Hmm the default installed binary amqstrg will do too, I presume
Back to top
View user's profile Send private message
RogerLacroix
PostPosted: Mon Jun 28, 2004 8:23 am    Post subject: Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 3264
Location: London, ON Canada

Hi,

From the program's source code:
Quote:
AMQSTRG0 is a sample C program that acts as a trigger monitor - reads an initiation queue, then starts the program associated with each trigger message.


Sure, amqstrg can get messages from a queue but I don't think this is a good example for Bracken to use.

Regards,
Roger Lacroix
_________________
Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter
Back to top
View user's profile Send private message Visit poster's website
LuisFer
PostPosted: Mon Jun 28, 2004 12:13 pm    Post subject: Reply with quote

Partisan

Joined: 17 Aug 2002
Posts: 302

With a little changes (OpenOption & gmoOption to do destructive), the AMQSBCG sample is a good EmpyQ.
Regards
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » How can I clear a queue when is handle by an application.
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.