Posted: Fri Mar 07, 2003 3:05 am Post subject: Request/Reply with MQAX
Novice
Joined: 06 Jul 2002 Posts: 17
Hi all,
We have a source QM's QM1,QM2,QM3 sending messages to QM4. Each of the source QM's set the ReplyToQ and ReplyToQMgrName with the message. How do I respond back to them from QM4.
Please note I am using the COM MQAX Dll for dealing with reading the messages from the Local Queue on QM4. I am stuck as how to get the responses back to the Source QM's. I did lots of search on this web site and found the following articles which talk the same issue but I am still unclear how do I accomplish the same using COM MQAX Components.
The sequence of steps we generally follow with MQAX while replying the messages to remote QM (QMR) using a Remote Queue (RQ) on Local QM (QML) are
1 Access the QML from the MQSession Object.
2 Access the RQ on the QML MQManager Object.
3 Submit the message to MQQueue Object.
RQ has both Remote Queue/QMGR Name and Transmission Queue.
But in the problem scenario I get the Remote Queue/QMGR Name as part of the message I tried creating Transmission Queue with same names as the of the Source QMs QM1 QM2 QM3. But what should I use to connect in the first step.
I am confused how do I accomplish this.
would appreciate your quick response in this regards.
Posted: Mon Mar 10, 2003 7:27 pm Post subject: Request/Reply with MQAX
Novice
Joined: 06 Jul 2002 Posts: 17
Hi All,
I found the solution. It was an overlook on my part that I didn't check the optional parameters on one of the function which does this trick.
Well the general sequence of steps is
For Receiving te Request.
Create MQSession Object.
on MQSession Object do an AccessQueueManager call.
on QueueManager Object do an AccessQueue Call.
on Queue Object do a GetMessage Call to get the Request Message. The Request Message has ReplyToQName & ReplyToQMgrName in it.
For Sending the Reply.
Create an MQSession Object.
on MQSession Object do an AccessQueueManager call to Local QMGR.
on QueueManager Object do an AccessQueue Call.
AccessQueue takes an optional parameter QMgrName. so give the RequestMsg.ReplyToQName and RequestMsg.ReplyToQmgrName as parameters to it. So as cited in the below articles QM does the internal name resolution and routes the Response messsage to the destination.
on Queue Object do a PuMessage Call to send the Reply Message.
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