Author |
Message
|
MarkDev |
Posted: Mon Nov 17, 2003 10:49 am Post subject: Forcing Clear of Queue |
|
|
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 |
|
 |
jefflowrey |
Posted: Mon Nov 17, 2003 11:03 am Post subject: |
|
|
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 |
|
 |
Missam |
Posted: Tue Nov 18, 2003 9:08 am Post subject: |
|
|
Chevalier
Joined: 16 Oct 2003 Posts: 424
|
Hi
Can't we Use
amqsclear <QName> <QMgrName>
to clear the queue. |
|
Back to top |
|
 |
vennela |
Posted: Tue Nov 18, 2003 9:38 am Post subject: |
|
|
 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 |
|
 |
mrlinux |
Posted: Tue Nov 18, 2003 10:16 am Post subject: |
|
|
 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 |
|
 |
bower5932 |
Posted: Tue Nov 18, 2003 1:52 pm Post subject: |
|
|
 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 |
|
 |
MarkDev |
Posted: Thu Nov 20, 2003 7:46 am Post subject: |
|
|
Newbie
Joined: 28 Jul 2003 Posts: 8
|
Is there a way to force the clear from the MQ Explorer? |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Nov 20, 2003 7:52 am Post subject: |
|
|
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 |
|
 |
PeterPotkay |
Posted: Thu Nov 20, 2003 7:52 am Post subject: |
|
|
 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 |
|
 |
|