|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
How to approach? |
« View previous topic :: View next topic » |
Author |
Message
|
kapoorvineesh |
Posted: Tue May 18, 2004 11:34 pm Post subject: How to approach? |
|
|
 Newbie
Joined: 13 Apr 2004 Posts: 7
|
Hi,
I was considering a situation wherein the application (On an MQ client) will send a request message on a Q and then retrieve the response for the request on another Q. Now the application will wait for a response from the remote Q for x time period and after which it will throw an error message to the user and the user will need to re send the request. Now the issue here is: what if the reponse of the remote Qmgr is slow and hence it puts the response messages on the Q (returning it to the application) such that when the message reaches the destination Q the application has timed out. Hence, the destination Q will now have messages for a request which it has cancelled. How do i handle these messages?
One approach is that we set the message expiry time in the QMD. however this only determines the time limit for the messages when they are on the Q (either direction). But it does not take into account how much time the remote Qmgr took to service the request. Hence, if the request messages gets picked from Q within the expiry limit and the remote Qmgr takes a lot of time to process the request, after which it puts it on the response Q (back to the application). Meanwhile the application resends the request on the request Q (since it has already faced a time out as a whole) and opens the response Q expecting a response message, and the message happens to be the response for the previously timed out request (which has not expired for the time set in the QMD). How can i prevent this from occuring?
Regards
Vineesh |
|
Back to top |
|
 |
JasonE |
Posted: Wed May 19, 2004 1:25 am Post subject: |
|
|
Grand Master
Joined: 03 Nov 2003 Posts: 1220 Location: Hursley
|
Use expiry as suggested, but the standard way is to let MQ generate msgids on the put of the request, and ensure the reply message has a unique msgid but the correlid of the original (request) msgid. Therefore the app, when getting the reply, gets by correlid (passing in the msgid returned following the put of the request). |
|
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
|
|
|
|