Author |
Message
|
BarryB |
Posted: Thu Aug 19, 2004 6:57 am Post subject: Program was terminated - queue still open - cant delete msgs |
|
|
Acolyte
Joined: 01 Jul 2004 Posts: 53 Location: Vernon Hills, Il
|
Hello,
We have 'killed' a program that was getting messages from a queue, and the queue is still open. I cannot delete messages from that queue using the delete command as it states the queue is still open. Any way of overriding this somehow?
Thanks,
B |
|
Back to top |
|
 |
MQGuy2000 |
Posted: Thu Aug 19, 2004 7:01 am Post subject: |
|
|
Centurion
Joined: 20 Jul 2003 Posts: 131
|
You can disable gets and then delete messages and then enable it again. I believe this will work. |
|
Back to top |
|
 |
BarryB |
Posted: Thu Aug 19, 2004 7:07 am Post subject: |
|
|
Acolyte
Joined: 01 Jul 2004 Posts: 53 Location: Vernon Hills, Il
|
I disabled gets, and it still won't let me delete the messages. It won't even let me delete the queue itself. Is there a 'force delete'? |
|
Back to top |
|
 |
BarryB |
Posted: Thu Aug 19, 2004 7:11 am Post subject: |
|
|
Acolyte
Joined: 01 Jul 2004 Posts: 53 Location: Vernon Hills, Il
|
It tells me to remove input and output handles before a delete can occur. How can I do this? Any MQSC command? |
|
Back to top |
|
 |
RogerLacroix |
Posted: Thu Aug 19, 2004 7:19 am Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
|
Back to top |
|
 |
skn |
Posted: Thu Aug 19, 2004 7:20 am Post subject: |
|
|
 Centurion
Joined: 21 May 2003 Posts: 112 Location: Dallas
|
What is " Delete Command " ?
Use the sample amqsget to clear the queue.You may have to modify it to handle your messages depending on their size by changing the buffersize. |
|
Back to top |
|
 |
BarryB |
Posted: Thu Aug 19, 2004 7:30 am Post subject: |
|
|
Acolyte
Joined: 01 Jul 2004 Posts: 53 Location: Vernon Hills, Il
|
It will not allow me to get as it states the 'queue is in use' and handles exist. Probably because the program that was doing the gets originially was killed and left the queue in use. Is there any other way? |
|
Back to top |
|
 |
Nigelg |
Posted: Thu Aug 19, 2004 7:34 am Post subject: |
|
|
Grand Master
Joined: 02 Aug 2004 Posts: 1046
|
The agent should have detected that the app has gone away, but it only does this by checking the PID of the connected app. If this PID has been reused, or it was a java app running in a JVM which is still running, the agent will just continue to hold the queue open while it waits for more QI calls on the connection which are never going to come.
The only recourse is to stop and start the qmgr. |
|
Back to top |
|
 |
romudd |
Posted: Thu Aug 19, 2004 8:03 am Post subject: |
|
|
Apprentice
Joined: 12 Aug 2003 Posts: 31 Location: Sao Paulo - Brazil
|
If your application is running remotely (connected though a SVRCONN channel) you may "release" your queue by stopping this channel. It may be necessary to use mode(FORCE) |
|
Back to top |
|
 |
offshore |
Posted: Thu Aug 19, 2004 8:42 am Post subject: |
|
|
 Master
Joined: 20 Jun 2002 Posts: 222
|
I agree with Nigelg, once the app was killed, then mq should've detected that and released the hold.
I have ran into a few instances where the release wasn't immediate and it took "x" amount of time.
What version of MQ are you running? If you have 5.3 you should be able to do a DIS QSTATUS on the queue and see what process has ahold of it.
offshore
------------------------------
so cool, yet casually lame
------------------------------ |
|
Back to top |
|
 |
|