|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Request Reply in a for loop |
« View previous topic :: View next topic » |
Author |
Message
|
pvemuri |
Posted: Thu Nov 11, 2004 11:45 am Post subject: Request Reply in a for loop |
|
|
 Voyager
Joined: 05 Jan 2004 Posts: 83 Location: CA, USA
|
Hello all,
I need help in designing the following scenario:
There is a file with more than 2 partner ID's (number of ID's is dynamic). For each ID, I have to do a database insert (using another sub-flow or a flow). If there is a failure on database insertion ( deadlock or DB down etc), I have to write an error message onto the error queue and return for the processing of remaining partner ID's.
Also if the DB insertion is success then this flow sends out the nextVal to the calling flow. If the nextVal is not returned in 200 seconds then the calling flow has to throw an error and continue processing for the next partner ID.
I thought of handling the timeouts and request-reply with the aggregate nodes and use the PROPOGATE command in a loop to process for each partner ID. But how can I differentiate the control information of each message (as the number of partner ID's is dynamic).
If I skip using the aggregate nodes, then how can I implement time-outs ..
Your help is appreciated.
Thanks,
pvemri. |
|
Back to top |
|
 |
kirani |
Posted: Thu Nov 11, 2004 12:24 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
pvemuri wrote: |
There is a file with more than 2 partner ID's (number of ID's is dynamic). For each ID, I have to do a database insert (using another sub-flow or a flow). If there is a failure on database insertion ( deadlock or DB down etc), I have to write an error message onto the error queue and return for the processing of remaining partner ID's.
|
How do you plan on putting file onto queue and how are you planning on splitting partner data? Are you going to put one MQ message for each partner ID?
pvemuri wrote: |
Also if the DB insertion is success then this flow sends out the nextVal to the calling flow. If the nextVal is not returned in 200 seconds then the calling flow has to throw an error and continue processing for the next partner ID.
|
Why do you need two stage flow for this? You can do these two steps (DB Inser & creating an Error reply message ) in one flow itself. _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
pvemuri |
Posted: Thu Nov 11, 2004 12:39 pm Post subject: |
|
|
 Voyager
Joined: 05 Jan 2004 Posts: 83 Location: CA, USA
|
Kiran,
The incoming message file contains a list of partner ID's. I will have to read them into an array and,
for each partner ID I will have to call a routine that does the DB insert. It will update a status field as AVAILABLE against that particular partner ID. I donot need to split the data. Just read all the partner ID's and update the DB. And handle any DB errors or time outs.
Even if there is an error while updating the DB for first partner ID I have to continue the process for other partner ID's. My flow should not stop.
Also I will be using this DB insert sub-routine in many other flows. Hence I was planning to implement it as a seperate flow.
Thanks,
pvemuri. |
|
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
|
|
|
|