简体   繁体   中英

How to access all the queue managers by connecting to the IBM MQ Server using IBM MQ classes in java

I have been trying to find all the queue managers inside IBM MQ Server by giving server details without queue manager name.

The idea is:

  • I have a properties file having server details- host, port number, channel, userid, passwrd.
  • By using this info we need to connect to the server and find all the queue managers available in the server.
  • I need to use IBM MQ classes in java.

As we have ways to find all the queues inside a queue manager can we do similarly to find all queue managers?

No.

PCF operations like getting the list of queues require you to connect to a queue manager first. To get the list of queue managers on a machine requires OS-level commands instead. A couple of ways that can be done

  • run dspmq (if you can work out where it might be - cannot assume it's always in /opt/mqm/bin and might require setmqenv to give it a workable environment) and then parse the output
  • directly parse /var/mqm/mqs.ini (more challenging on Windows or even worse on z/OS).

And if you're trying to do it remotely, then you have to wrap it up in something like ssh.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM