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 » Forcing Clear of Queue

Post new topic  Reply to topic
 Forcing Clear of Queue « View previous topic :: View next topic » 
Author Message
MarkDev
PostPosted: Mon Nov 17, 2003 10:49 am    Post subject: Forcing Clear of Queue Reply with quote

Newbie

Joined: 28 Jul 2003
Posts: 8

Is there a way to force a clear of a queue if it is being held open by another process?
Back to top
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Mon Nov 17, 2003 11:03 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Yes. Use any program that can do destructive gets - one for each message.

There's a 'q' utility program available as a free support pack. Or you could use amqsget/amqsgetc.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Missam
PostPosted: Tue Nov 18, 2003 9:08 am    Post subject: Reply with quote

Chevalier

Joined: 16 Oct 2003
Posts: 424

Hi
Can't we Use
amqsclear <QName> <QMgrName>
to clear the queue.
Back to top
View user's profile Send private message
vennela
PostPosted: Tue Nov 18, 2003 9:38 am    Post subject: Reply with quote

Jedi Knight

Joined: 11 Aug 2002
Posts: 4055
Location: Hyderabad, India

I don't see amqsclear as one of the samples supplied with the product or any reference to it in the manuals. Maybe it is your own custom application.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
mrlinux
PostPosted: Tue Nov 18, 2003 10:16 am    Post subject: Reply with quote

Grand Master

Joined: 14 Feb 2002
Posts: 1261
Location: Detroit,MI USA

you can modify the existing amqsget0.c program to get messages off the queue you need to change the line containing char buffer[100]; to
char buffer[MAX_MESSAGE_SIZE];

MAX_MESSAGE_SIZE needs to the max size of your messages
_________________
Jeff

IBM Certified Developer MQSeries
IBM Certified Specialist MQSeries
IBM Certified Solutions Expert MQSeries
Back to top
View user's profile Send private message Send e-mail
bower5932
PostPosted: Tue Nov 18, 2003 1:52 pm    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

You could also change the buffer size to 1 and change the get options to accept a truncated message.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
MarkDev
PostPosted: Thu Nov 20, 2003 7:46 am    Post subject: Reply with quote

Newbie

Joined: 28 Jul 2003
Posts: 8

Is there a way to force the clear from the MQ Explorer?
Back to top
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Thu Nov 20, 2003 7:52 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

MarkDev wrote:
Is there a way to force the clear from the MQ Explorer?


Not that I've found.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
PeterPotkay
PostPosted: Thu Nov 20, 2003 7:52 am    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7722

You could try to GET and PUT Inhibit the queue, wait till IPROCS and OPROCS counts (hopefully) go to zero, and then clear it. Depending on how the app was written though this may not shake the app loose.

Clearing the queue by destructivly getting with another app is the easiest I find. And for the cases where an app opened the queue as InputExclusive, preventing this method, then Inhibiting the queue knocking out the app is the next posability, at which point you can clear the queue.
_________________
Peter Potkay
Keep Calm and MQ On
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 » Forcing Clear of Queue
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.