|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Msg Flow instances and thread safe esql code |
« View previous topic :: View next topic » |
Author |
Message
|
CuriCAT |
Posted: Fri Jun 12, 2009 7:02 am Post subject: Msg Flow instances and thread safe esql code |
|
|
 Voyager
Joined: 26 Sep 2006 Posts: 82
|
message flow design:
MQInput > Mapping > Compute > FileOutput node
Msg Flow retriving millions of records from MQ queue and writting it into different file segments, based on record count, File names are decided dynamically by incrimenting segment number at compute node.
Flow would start writting to first file segment If record count reaches a million it switchs over to second segment and so forth. I made this flow multiple instances. The flow works perfect for up to 10 instances, if I run more instances, some of the file segments are populated with only few records not with perfect count of a million. I suspect some of my esql code is not thread safe, that leads to this problem.
Please let me know how can I make my esql code thread safe. |
|
Back to top |
|
 |
elvis_gn |
Posted: Fri Jun 12, 2009 7:16 am Post subject: |
|
|
 Padawan
Joined: 08 Oct 2004 Posts: 1905 Location: Dubai
|
Hi CuriCAT,
If your posts don't have a single line of code, how are we supposed to know what you are doing ?
And since we know you cannot append records to files, I would assume you are keeping all records in memory and writing them all together...
Regards. |
|
Back to top |
|
 |
zpat |
Posted: Fri Jun 12, 2009 9:13 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
FileOutput does append until the file finish signal. It's the FTP option that can't append.
You can use BEGIN ATOMIC to make code threadsafe in ESQL. |
|
Back to top |
|
 |
CuriCAT |
Posted: Fri Jun 12, 2009 10:33 am Post subject: |
|
|
 Voyager
Joined: 26 Sep 2006 Posts: 82
|
Thanks zpat, I think BEGIN ATOMIC should work, thats what I have been looking for.
Let me post if that works. Thank you. |
|
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
|
|
|
|