Posted: Thu Feb 13, 2003 7:07 am Post subject: How do I list all topics + their real queue names?
Newbie
Joined: 09 Sep 2002 Posts: 3 Location: London
In our system we would like to monitor the topic queues but in MQ they have very user-unfriendly names such as "SYSTEM.JMS.D.2003012007222574" etc etc. I would therefore like to list the topic names plus the actual queue name.
Using the MQ JMS jars we have found a way to list all the topics and their corresponding queue names for our queue manager as follows:
Code:
try {
MQEnvironment.hostname = hostname;
MQEnvironment.channel = channel;
MQEnvironment.port = port;
MQQueueManager qMgr = new MQQueueManager(queueManager);
MQDurSubAdmin durSubAdmin = new MQDurSubAdmin(qMgr);
Vector vec = durSubAdmin.getAll();
Iterator iter = vec.iterator();
This works fine most of the time, except I occasionally get the error 2042 - MQRC_OBJECT_IN_USE. According to the Application Programming Reference manual it could be because another application has opened the object. This is true in the there are other processes which are simultaneously subscribing to these topics and processing the messages as they arrive.
Is there a better solution than this i.e. somehow through the TopicConnectionFactory?
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