ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Msg Flow instances and thread safe esql code

Post new topic  Reply to topic
 Msg Flow instances and thread safe esql code « View previous topic :: View next topic » 
Author Message
CuriCAT
PostPosted: Fri Jun 12, 2009 7:02 am    Post subject: Msg Flow instances and thread safe esql code Reply with quote

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
View user's profile Send private message Send e-mail Yahoo Messenger
elvis_gn
PostPosted: Fri Jun 12, 2009 7:16 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
zpat
PostPosted: Fri Jun 12, 2009 9:13 am    Post subject: Reply with quote

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
View user's profile Send private message
CuriCAT
PostPosted: Fri Jun 12, 2009 10:33 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Yahoo Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Msg Flow instances and thread safe esql code
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.