|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Using PCF to list queues of several types |
« View previous topic :: View next topic » |
Author |
Message
|
ZlenkD |
Posted: Mon Apr 18, 2005 12:43 pm Post subject: Using PCF to list queues of several types |
|
|
Newbie
Joined: 18 Apr 2005 Posts: 2 Location: Harrisburg, PA
|
I know there have been numerous inquiries about listing queues on a given queue manager but a search did not yield an answer to my specific question.
If I want to use PCF to resolve all queue names I enter the string "*" in this context as a PCFParameter:
new MQCFST (CMQC.MQCA_Q_NAME, "*")
Basically, I want to do the same thing to list all queue types, of course it wants an integer so the "*" string would not be applicable. I thought I would be able to substitute this line:
new MQCFIN (CMQC.MQIA_Q_TYPE, CMQC.MQQT_LOCAL),
with this code:
new MQCFIN (CMQC.MQIA_Q_TYPE, CMQC.MQQT_LOCAL|CMQC.MQQT_REMOTE)
to list the local and remote queues, but that did not work. Omitting this parameter only returns local queues. If there is anyway to do this let me know. For reference I included the code snippet where the above code fits into. TIA
Code: |
PCFAgent agent;
int [] attrs =
{
CMQC.MQCA_Q_NAME,
CMQC.MQIA_CURRENT_Q_DEPTH
};
PCFParameter [] parameters =
{
new MQCFST (CMQC.MQCA_Q_NAME, "*"),
new MQCFIN (CMQC.MQIA_Q_TYPE, CMQC.MQQT_LOCAL),
new MQCFIL (CMQCFC.MQIACF_Q_ATTRS, attrs)
};
agent = new PCFAgent (host, port, channel);
responses = agent.send(CMQCFC.MQCMD_INQUIRE_Q, parameters);
|
|
|
Back to top |
|
 |
EddieA |
Posted: Mon Apr 18, 2005 1:07 pm Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
Did you even bother looking in the PCF Manual. MQQT_ALL.
Also, I would check your code, because the default if Q_TYPE is not supplied is MQQT_ALL.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
clindsey |
Posted: Mon Apr 18, 2005 1:09 pm Post subject: |
|
|
Knight
Joined: 12 Jul 2002 Posts: 586 Location: Dallas, Tx
|
Looks like those fields were not designed to be OR'ed. They are not bit fields. MQQT_LOCAL = 1, MQQT_REMOTE = 6. ORing this together yields 7 which is MQQT_CLUSTER so you definitely do not get what you are after.
I had a similar problem is trying to use regular expressions to get a list of the queue names, but anything after the * is ignored. You can do ABC* but not *ABC. I ended up getting the list using * and then applying my own matchstrings to the returned list to filter out what I wanted. You could do the same and include the attribute MQQT_ALL and then discard the results that do not match the types you are looking for.
I know that is not what you are looking for but it will work.
Charlie |
|
Back to top |
|
 |
ZlenkD |
Posted: Mon Apr 18, 2005 1:37 pm Post subject: |
|
|
Newbie
Joined: 18 Apr 2005 Posts: 2 Location: Harrisburg, PA
|
Sorry Eddie, I overlooked the MQQT_ALL constant. Thanks for pointing out the default behavior was MQQT_ALL as I found a bug that was making it appear the remote queues were not being resolved. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|