是否只能获取本地队列和别名队列的队列名称? [英] Is it possible to get only the queue names of local and alias queues?

查看:88
本文介绍了是否只能获取本地队列和别名队列的队列名称?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在获得所有这样的队列名称:

I'm currently getting all of the queue names like this:

PCFAgent agent = new PCFAgent(this.HostName, this.Port, this.CHANNEL_NAME);
PCFParameter[] parameters = { new MQCFST(CMQC.MQCA_Q_NAME, "*"), new MQCFIN (CMQC.MQIA_Q_TYPE, CMQC.MQQT_ALL) };
MQMessage[] responses = agent.send(CMQCFC.MQCMD_INQUIRE_Q_NAMES, parameters);
MQCFH cfh = new MQCFH(responses[0]);

但是我也有远程队列,有没有办法只检索本地和别名队列名称?

But I'm also getting remote queues, is there a way to retrive only local and alias queue names?

推荐答案

由于您可以指定队列类型,因此通过发出两个具有指定队列类型的呼叫,您应该能够抢占所需的队列.

As you can specify the queue type, you should be able to grab the desired queues by issuing two calls with your specified queue type.

PCFParameter[] parameters = { new MQCFST(CMQC.MQCA_Q_NAME, "*"), new MQCFIN (CMQC.MQIA_Q_TYPE, CMQC.MQQT_LOCAL) };
 agent.send(..);
 // etc.. Get local queues
parameters = { new MQCFST(CMQC.MQCA_Q_NAME, "*"), new MQCFIN (CMQC.MQIA_Q_TYPE, CMQC.MQQT_ALIAS) };
 agent.send(..);

 // etc.. get alias queues

 // TODO: now build a list of all queues, local and alias. 

这篇关于是否只能获取本地队列和别名队列的队列名称?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆