ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General IBM MQ Support » MQ Client

Post new topic  Reply to topic
 MQ Client « View previous topic :: View next topic » 
Author Message
harshatej1
PostPosted: Fri Apr 03, 2015 12:00 pm    Post subject: MQ Client Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Fri Apr 03, 2015 12:04 pm    Post subject: Re: MQ Client Reply with quote

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
View user's profile Send private message
exerk
PostPosted: Fri Apr 03, 2015 1:03 pm    Post subject: Reply with quote

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
View user's profile Send private message
PaulClarke
PostPosted: Fri Apr 03, 2015 1:52 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
PeterPotkay
PostPosted: Fri Apr 03, 2015 6:05 pm    Post subject: Reply with quote

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
View user's profile Send private message
tczielke
PostPosted: Sat Apr 04, 2015 5:09 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » MQ Client
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.