|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Persistent messages in a message flow. |
« View previous topic :: View next topic » |
Author |
Message
|
LH33 |
Posted: Tue Jan 28, 2003 8:09 am Post subject: Persistent messages in a message flow. |
|
|
Master
Joined: 21 Nov 2002 Posts: 200
|
HI!
I have to design a message flow that accepts an XML message from a queue, evaluates a tag in the message and if the tag has a value, create a Request/Reply transaction to be placed on a Queue for another system to pick it up, query it's database for two values to pass back to my flow. How would I store the original message and then match the reply message coming back to my original message to add the two fields sent back to me to the original XML? Also, what should be considered for how long to wait for the reply before letting the original XML message continue on in the flow for further transformations before producing a final XML transaction? Additionally, if the wait time for the reply is expired and I have already sent the original message through - what happens if the Reply comes in afterwards? (Note: - Accessing the other system's database directly is not an option)
Any help would be greatly appreciated! Thanks!! LisaB |
|
Back to top |
|
 |
philip.baker |
Posted: Tue Jan 28, 2003 2:44 pm Post subject: |
|
|
 Voyager
Joined: 21 Mar 2002 Posts: 77 Location: Baker Systems Consulting, Inc. - Tampa
|
LisaB,
One (of a few) technique(s) to do this is to first be assured there is some unique identifying information within the MQSI-outgoing message body that will be assured of coming back in the MQSI-reply message body. Use this piece of information as the 'key' to insert a copy of the needed MQSI-outgoing message into a temporary database 'holding' table.
ESQL Example:
SET accountno = "InputBody"."ACCOUNT_STRUC"."UACCOUNT_NUMBER";
SET accountdata = CAST(BITSTREAM(InputBody) AS CHAR CCSID InputRoot.MQMD.CodedCharSetId);
INSERT INTO Database.WMQI.SavedData(ACCOUNTNUM, ACCOUNTDATA, CURRENT_TM) VALUES(accountno, accountdata, CURRENT_TIMESTAMP);
When the reply message is returned to WMQI, query the database using the 'accountno' key field. The CURRENT_TIMESTAMP field can be used to determine if the reply message has been supplied too late. (It would be best to determine the time of receiving the reply message on the same server that the MQSI-outgoing message was saved so both time stamps were determined from the same server clock.) The time-out period can be predetermined and hard-coded into the flow, or retreived from a database (more flexible if the timeout might be changed), or the reply message itself may contain its own time-out period. The message flow logic can route a timed-out message differently.
I am not sure if I would want to try and have the original flow wait for a period of time before processing. After storing the message to a database and sending the request for the database lookup, you may want to have the flow do nothing else. Or you can place the message to a 'holding' queue and have the reply message MQSI flow use the MQGET node to retrieve the matching message from this queue rather than use the database scenario explained above. I myself like to use temporary database storage for this type of operation. It seems to be a more flexible and dependable solution. _________________ Regards,
Phil |
|
Back to top |
|
 |
LH33 |
Posted: Wed Jan 29, 2003 4:50 am Post subject: |
|
|
Master
Joined: 21 Nov 2002 Posts: 200
|
Phil,
Thanks so much for your answer! I am going to try the temporary database storage method!
LisaB |
|
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
|
|
|
|