|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Need to implement synchronous call to mq |
« View previous topic :: View next topic » |
Author |
Message
|
Rehan |
Posted: Mon Oct 20, 2003 5:06 pm Post subject: Need to implement synchronous call to mq |
|
|
Newbie
Joined: 20 Oct 2003 Posts: 1
|
Hey guys,
I am fairly new to mq. So this might seem like a newbie question...so my appologies. Basically, what i am trying to do is that i am posting a form to a servlet, which send the posted data to the queue. Now I need to wait for reply back from the 2 machine. What I dont know how to do is, wait for the respond. Any suggestions will greatly appreciated.
Thanks in advance.
rehan |
|
Back to top |
|
 |
rwa |
Posted: Tue Oct 21, 2003 12:06 am Post subject: |
|
|
Voyager
Joined: 22 Jan 2002 Posts: 76 Location: Duesseldorf/Germany
|
Hi Rehan,
first of all, MQseries uses asychronous communication. Therefore you have to "bind" two transactions together.
One approch is request/reply. In the request transaction (... send the posted data to the queue ...) a uniq identifier is created. This identifier is the messageid (MsgID). The program on the second machine reads this message and copies this MsgID into the field CorrelID of the reply message. The requesting program waits at the same time for the reply message by setting a filter on CorrelID = MsgID.
There are example programs in the software repository of MQsereis.net like
http://www.mqseries.net/pafiledb203/pafiledb.php?PHPSESSID=7eae4f506831cb3dfd158334f12881a1&action=viewfile&fid=14&id=2
There are other designs to solve your problem, but this example is a good think to start with.
Regards,
Rainer |
|
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
|
|
|
|