|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
MQCONN and asterisk |
« View previous topic :: View next topic » |
Author |
Message
|
koami |
Posted: Thu Aug 12, 2004 3:55 pm Post subject: MQCONN and asterisk |
|
|
Novice
Joined: 28 Apr 2004 Posts: 10 Location: San Marcos, California - USA
|
Hello!
Is there a way to MQCONN to an asterisk (*) in the distributed environment (Windows or AIX)?
I have a Client application I would like to modify to connect to an asterisk instead of a specific qmgr. I want the application to parse the MQClient Channel table and connect to the first Qmgr in the table; and if that queue manager is down, go down to the next one in the table and so on.
I am using amqsputc sample code for testing, I have changed the "qmgr" command line argument with "*" in the code.
When tried to run it without specifying a Qmgrname (amqsputc "QUEUENAME" ) I was getting the following:
"MQRC_Q_MGR_NOT_AVAILABLE"
Thanks |
|
Back to top |
|
 |
Missam |
Posted: Thu Aug 12, 2004 9:11 pm Post subject: |
|
|
Chevalier
Joined: 16 Oct 2003 Posts: 424
|
well first of all this is a question to be posted in API Support form.
Quote: |
I am using amqsputc sample code for testing, I have changed the "qmgr" command line argument with "*" in the code.
When tried to run it without specifying a Qmgrname (amqsputc "QUEUENAME" ) I was getting the following:
"MQRC_Q_MGR_NOT_AVAILABLE"
|
Using * in the sence,you (logically) know * means to connect to any queue manager in the client defintion table.but the application programs doesn't under stand that.they think that * is another character and try to connect to QueueManager Named '*' and fail to connect giving the error "MQRC_Q_MGR_NOT_AVAILABLE".so you need to come up with an implementation,when ever you see a * in the name of the queue manager.get the QM's listed in Client Channel Definition table and try connecting each one until you connect to one of them. |
|
Back to top |
|
 |
PeterPotkay |
Posted: Fri Aug 13, 2004 4:43 pm Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
Applications can code "*" or "*QMname" in the MQCONN call.
When an app issues an MQCONN call, and a channel table is used, MQ starts searching the channel table alphabetically by channel name. It will attempt to use a particulat entry in the channel table using the following rules:
If you coded a qm name in the MQCONN call ("QM1"), you are telling MQ to only try entries in the channel table that have that exact name ("QM1") in the CLNTCONN definition. It will ignore any entries in the table that have any other QM name specified, and it will ignore any entries that have no QM name specified. It will try all those that meet that criteria, alphabetically by channel name, until a succeful connection is made or until it runs out of eligible entries in the table.
If you coded a qm name in the MQCONN call with an * ("*QM1"), you are telling MQ to only try entries in the channel table that have that any QM name ("QM1" or "QM2") in the CLNTCONN definition. It will ignore any entries in the table that have a blank QM parameter. It will try all those that meet that criteria, alphabetically by channel name, until a succeful connection is made or until it runs out of eligible entries in the table.
If you coded no qm name in the MQCONN call or only an * ("*" or " "), you are telling MQ to only try entries in the channel table that have NO QM name in the CLNTCONN definition. It will ignore any entries in the table that have a filled in QM parameter. It will try all those that meet that criteria, alphabetically by channel name, until a succeful connection is made or until it runs out of eligible entries in the table. You will only connect to a QM if it is designated as the default QM on the target server.
How amqsputc reacts when it sees a * on the command line, I don't know. But if it recognizes it internally and supplies it on its MQCONN call, the rules above apply. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
kirani |
Posted: Fri Aug 13, 2004 10:14 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Please post API related questions into MQ API Forum.
[Moving to API Support Forum] _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|