Author |
Message
|
sayan |
Posted: Sun Mar 09, 2008 10:10 pm Post subject: Requirement to connect to multiple Queue Managers |
|
|
Novice
Joined: 22 Feb 2008 Posts: 13
|
Hi,
In our production setup, we have one queue manager and the third party whom we have a connection with has 4 queue managers. The third party is embedding the names of the ReplyToQMgr and ReplyToQ fields of the MQMD structure. That means that while replying to their messages we have to read these two fields.
As far as my understanding, for this we will have different remote queue definitions for each of the 4 queues in the queue managers the third party has.
While programming, how should i use these two fields? Pls advise as I am new to this.
Do i have to open the Qmgr as specified in the MQMD structure or does MQ takes care of it? |
|
Back to top |
|
 |
Gaya3 |
Posted: Sun Mar 09, 2008 10:25 pm Post subject: |
|
|
 Jedi
Joined: 12 Sep 2006 Posts: 2493 Location: Boston, US
|
through program
you have to connect, open and do operations with the queue manager.
you can access the MQMD structures from ur programme for sure.
Regards
Gayathri _________________ Regards
Gayathri
-----------------------------------------------
Do Something Before you Die |
|
Back to top |
|
 |
sayan |
Posted: Sun Mar 09, 2008 11:30 pm Post subject: |
|
|
Novice
Joined: 22 Feb 2008 Posts: 13
|
Hi,
I am not sure, but wouldn't we be getting an error while opening up a remote queue manager?
The ReplyToQMgr has the name of the Queue Manager which is on some other server. Can we access/open a Queue manager which is not in the local server?
Pls correct me if I am wrong. |
|
Back to top |
|
 |
Gaya3 |
Posted: Sun Mar 09, 2008 11:34 pm Post subject: |
|
|
 Jedi
Joined: 12 Sep 2006 Posts: 2493 Location: Boston, US
|
yes you can connect to a remote queue manager
you code has to be MQ client specific code then,
where you can connect with queue manager located remotely.
Refer MQ API reference and MQ Client PDF's for more information to build up
Regards
Gayathri _________________ Regards
Gayathri
-----------------------------------------------
Do Something Before you Die |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Mar 10, 2008 6:05 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
sayan wrote: |
Hi,
I am not sure, but wouldn't we be getting an error while opening up a remote queue manager?
The ReplyToQMgr has the name of the Queue Manager which is on some other server. Can we access/open a Queue manager which is not in the local server?
Pls correct me if I am wrong. |
Yes you can do that. You need however to make sure that there is a "default" path to the target qmgr. See intercommunications manual for more details (routing, multi-hopping and qmgr alias).
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
zpat |
Posted: Mon Mar 10, 2008 7:35 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
Some people get confused here. The correct approach is NOT to connect directly to the remote queue managers from the MQ client application.
The MQ client does not need to know anything about these remote queue manager (indeed it must not to maintain abstraction).
What happens is that you connect to your local queue manager ONLY.
When you want to reply to a message you MQOPEN the relevant replytoqueuemanager and replytoqueuename based on the request message MQMD values (or default them if not present).
You can use the MQPUT1 operation to make life easier in the program as this will perform MQOPEN, MQPUT and MQCLOSE and is ideally suited to reply message processing (where the queue manager associated with the reply queue may vary).
When you open a queue with a queue manager that is not local, what happens is that you will be opening the transmit queue for that queue manager on your local queue manager.
The key thing to understand is that a queue manager name can be associated with a MQOPEN as well as a MQCONN. |
|
Back to top |
|
 |
|