Author |
Message
|
adivyayadav |
Posted: Wed Nov 23, 2011 8:52 am Post subject: Java utility |
|
|
 Novice
Joined: 09 Mar 2011 Posts: 10
|
I want to develop a utility in java. It takes some arguments like Q manager name,Ip address and port of QM.
And it searches for all the local queues under that Queue manager which are not empty and clears them using MQGet command.
I cannot find a command to return the queues with messages under a given manager. Can someone help me in this??? |
|
Back to top |
|
 |
Vitor |
Posted: Wed Nov 23, 2011 9:07 am Post subject: Re: Java utility |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
adivyayadav wrote: |
II cannot find a command to return the queues with messages under a given manager. Can someone help me in this??? |
There isn't such a command. You'll need to code this. Something like:
- Obtain a list of all queues under a queue manager
- Inquire on the depth of each queue in the list
- If the depth is not zero clear the queue
It's easy enough in most languages, so presumably easy in Java.
Clearly your utility will need to differentiate in some way between messages which are stuck on the queue manager, and legitimately are on queues. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Vitor |
Posted: Wed Nov 23, 2011 9:10 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
You might also want to look into some of the existing support pacs that can achieve this. Or most of this.
Depending on exactly what you're trying to do. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
adivyayadav |
Posted: Wed Nov 23, 2011 9:11 am Post subject: |
|
|
 Novice
Joined: 09 Mar 2011 Posts: 10
|
Even I am having trouble locating the command to find the list of queues under a Q manager. |
|
Back to top |
|
 |
vmcgloin |
Posted: Wed Nov 23, 2011 9:41 am Post subject: |
|
|
Knight
Joined: 04 Apr 2002 Posts: 560 Location: Scotland
|
What have you tried?
Have you written similar java code before? Maybe try some backgorund reading? |
|
Back to top |
|
 |
Vitor |
Posted: Wed Nov 23, 2011 9:42 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
adivyayadav wrote: |
Even I am having trouble locating the command to find the list of queues under a Q manager. |
If you can't find that, you probably shouldn't be trying to write a utility untill you've become a lot more familar with the documentation.
Especially as you first asked us to tell you this back in March here.
And again in May here. That's a long time to not find something. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Nov 23, 2011 11:07 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
You'll need a mix of pcf and mqi calls.
With the pcf calls you will find all queues with non 0 curdepth.
Be sure to exclude the system queues.
Using standard mqi calls you will need to empty the queues.
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|