Author |
Message
|
nanotech |
Posted: Wed Apr 18, 2012 1:10 pm Post subject: Closing Queue handles |
|
|
Novice
Joined: 29 May 2009 Posts: 15
|
Hi All,
We have a scenario where multiple queue Alias point to one physical queue. Our Message Flows (Websphere Message Broker,message flows ) write to these alias queues and another client application (written in Java) reads off that queue.
So the requirement is to delete the queue alias if it is no longer needed without bouncing queue manager.
I am trying to delete the queue using PCF commands but when I do that I get MQRC 4004 (MQRCCF_OBJECT_OPEN). So I check through MQ explorer and see that there are two open handles to those queues, one held by client application and one by our DataflowEngine.
I attempted to close the queue (using Java Code ) MQQueue.close() but it had no effect.
Question is:
1. Is attempting to close the the queue the right approach ? If yes, how can I make sure that queue alias that I am interested in gets closed and other alias does not get affected ?
2. If closing the queue is not correct approach, then is it possible to delete those handles by using the queue alias name ( by either using MQ Java API or PCF commands ) , without affecting other queue alias which point to the same physical queue.
Thanks,
RG |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Apr 18, 2012 3:47 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
your statement says delete if no longer needed.... Well as long as you have a handle on it (ipprocs, opprocs), the queue is needed. And you won't drop the handle without restarting the message flow... (DataFlowEngine)
So what are you really trying to do? Kill the queue from under the application?  _________________ MQ & Broker admin |
|
Back to top |
|
 |
nanotech |
Posted: Wed Apr 18, 2012 4:44 pm Post subject: |
|
|
Novice
Joined: 29 May 2009 Posts: 15
|
According to our design, we have multiple queue alias (one per user) and one common queue . I would like to delete the Alias queue if that user is no longer active, without affecting the other users and without bringing the system down ( if possible ) |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Apr 18, 2012 5:31 pm Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
There's some documentation on when Broker will close open queue handles.
it may not be possible for broker to determine that a given 'user' is no longer active, and thus decide that it can close it's open handle on the relevant queue alias. |
|
Back to top |
|
 |
nanotech |
Posted: Wed Apr 18, 2012 6:03 pm Post subject: |
|
|
Novice
Joined: 29 May 2009 Posts: 15
|
Can you pls. point me to that documentation regarding open handles ?
Is it possible to close open handle using MQ Java API or some other API ? |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Apr 19, 2012 7:45 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
pcf command stopping the corresponding connection... but this might harm the broker.
What you really want to do is have the broker put the message to the common queue and have the client retrieve it using the alias...
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|