Author |
Message
|
pcouas |
Posted: Thu Jul 11, 2019 1:23 am Post subject: DELETE an Queue on usage 4004 with Channel |
|
|
Voyager
Joined: 06 Sep 2011 Posts: 79
|
Hi
Could i force to delete an Queue which is using by an Channel ?
Without stop and start this channel ?
There is no message in this queue
It's 4004 error, we using MQ V9
Regards |
|
Back to top |
|
 |
PaulClarke |
Posted: Thu Jul 11, 2019 2:37 am Post subject: |
|
|
 Grand Master
Joined: 17 Nov 2005 Posts: 1002 Location: New Zealand
|
There is no way that I know of to explicitly ask a Channel to close a queue. The Channel will cache the queue for the sake of performance. However, the cache is free'd when the channel next receives a heartbeat. So, provided the channel has a non busy time the queue should be closed sooner or later.
There is a really ugly solution that you're not going to like. The channel cache is of fixed size, I believe you can even set the size. Let's say it is 100. Now, if you send a message down a channel to queues DUMMY1, DUMMY2, DUMMY3.........DUMMY100 then you will have implicitly cleaned out the cache since all of these queues are newer than what was previously in the cache. I told you you weren't going to like it. It's not really a terribly practical solution but if you were desperate you could do this at a pinch. Bear in mind that it isn't actually necessary to create the queues DUMMY1 through DUMMY100 you could just collect the messages off the DLQ when they get there.
Of course there may be other solutions, I'd be interested to hear them.
Cheers,
Paul. _________________ Paul Clarke
MQGem Software
www.mqgem.com |
|
Back to top |
|
 |
GGermishuys |
Posted: Thu Jul 11, 2019 2:39 am Post subject: |
|
|
Newbie
Joined: 02 Jul 2019 Posts: 2
|
Hi
RC_4004 means the MQ Object is in Use
You can either close/stop the application that is connected via the channel to the Queue in question.
There is no FORCE command on a Delete Q command |
|
Back to top |
|
 |
GGermishuys |
Posted: Thu Jul 11, 2019 2:46 am Post subject: |
|
|
Newbie
Joined: 02 Jul 2019 Posts: 2
|
Here's one that i've used in the past ...
If you are making use of MQ Explorer v9 you can view Application Connections (right-click specific MQ Queue Manager --> Click on Application Connections ... )
This will give you a list of all Connections to your MQ Queue Manager - the tricky bit is finding the connection that has your MQ Queue Open - but if you happen to find it - there is a added button " Close Connection " - this, may help you to close off the connection to your queue and just go ahead for your Delete |
|
Back to top |
|
 |
pcouas |
Posted: Thu Jul 11, 2019 2:50 am Post subject: |
|
|
Voyager
Joined: 06 Sep 2011 Posts: 79
|
Hi
in "Usage" there is an application named "qs2qsc", i don't know this application ? |
|
Back to top |
|
 |
gbaddeley |
Posted: Thu Jul 11, 2019 4:25 pm Post subject: Re: DELETE an Queue on usage 4004 with Channel |
|
|
 Jedi Knight
Joined: 25 Mar 2003 Posts: 2538 Location: Melbourne, Australia
|
pcouas wrote: |
Hi, Could i force to delete an Queue which is using by an Channel ? Without stop and start this channel ? There is no message in this queue It's 4004 error, we using MQ V9 Regards |
This is MQ's way of saying that something recently put msgs to this queue (via a MQ Channel Agent process amqrmppa), so it may not be a good idea to delete this queue right now. The MCA will eventually release the handle (as Paul said). Alternatively, ending and starting the qmgr will also do the trick.
Quote: |
in "Usage" there is an application named "qs2qsc", i don't know this application ? |
This is not an MQ internal process. Check the tasks / processes that are running on the server. _________________ Glenn |
|
Back to top |
|
 |
|