Author |
Message
|
harshatej1 |
Posted: Fri Apr 03, 2015 12:00 pm Post subject: MQ Client |
|
|
Acolyte
Joined: 20 Nov 2013 Posts: 61
|
Could you please tell me how to know which queue manager is associated with MQ client(I want to check from MQ client) |
|
Back to top |
|
 |
Vitor |
Posted: Fri Apr 03, 2015 12:04 pm Post subject: Re: MQ Client |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
harshatej1 wrote: |
Could you please tell me how to know which queue manager is associated with MQ client(I want to check from MQ client) |
The MQ Client software doesn't "associate" with any queue manager.
If you want to know which queue manager is being used by an application that's using the MQ Client, look at the connection string the application is assembling. This will resolve to a unique queue manager. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
exerk |
Posted: Fri Apr 03, 2015 1:03 pm Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
Check the name returned when the client connects, don't rely on the name specified in the connection string if that string contains a wild-card... _________________ It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys. |
|
Back to top |
|
 |
PaulClarke |
Posted: Fri Apr 03, 2015 1:52 pm Post subject: |
|
|
 Grand Master
Joined: 17 Nov 2005 Posts: 1002 Location: New Zealand
|
If you are talking about doing it from within the client application then all you need to do is open the Queue Manager object on the MQHCONN returned from the MQCONN(X) and issue an MQINQ to inquire the Queue Manager name.
Cheers,
Paul. _________________ Paul Clarke
MQGem Software
www.mqgem.com |
|
Back to top |
|
 |
PeterPotkay |
Posted: Fri Apr 03, 2015 6:05 pm Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
Issue the amqscnxc command, without providing any parameters. If your MQ Client install is configured to go to a particular Queue Manager by default (when the MQ Client app doesn't override it), then amqscnxc (without any parms specified) will connect to that default QM, get the QM name, and end.
Its a safe little sample app that only connects to a QM, grabs the QM name and ends. It does not even attempt to open any queues.
Any MQ Client app, including amqscnxc, can override such a default setting. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
tczielke |
Posted: Sat Apr 04, 2015 5:09 am Post subject: |
|
|
Guardian
Joined: 08 Jul 2010 Posts: 941 Location: Illinois, USA
|
If we are talking about finding this information for a running client application, another option is to use native commands to find out socket information on the client application. For example, if this is Linux, you could use lsof (with the -p option) to find out what sockets your client application pid is using. From that output, you should be able to see the ip address/port of the queue manager your client is connected to. _________________ Working with MQ since 2010. |
|
Back to top |
|
 |
|