Hi Yes great idea. Hadrian did you create the JIRA? The same technique can be applied for the FTPProducer as well.
Med venlig hilsen Claus Ibsen ...................................... Silverbullet Skovsgårdsvænget 21 8362 Hørning Tlf. +45 2962 7576 Web: www.silverbullet.dk -----Original Message----- From: Hadrian Zbarcea [mailto:[EMAIL PROTECTED] Sent: 8. august 2008 21:49 To: [email protected] Subject: Re: FileProducer enhancement suggestion Thanks for the feedback. I will create a jira. Hadrian On Aug 8, 2008, at 2:55 PM, tourist604 wrote: > > Hi, > > I would like to suggest an enhancement for the FileProducer: > > It may be very likely that the FileProducer is producing into a > directory > which is being scanned by another FileConsumer. It's very easy to > get into a > race condition when the file is not completely written and another > FileConsumer is already picking it up. I think there is a change > scheduled > for 1.5.0 where "consumer.exclusiveReadLock" can be specified. > However, the > solution below may prove to be simpler and more portable to different > filesystems. > > Perhaps, the FileProducer can write the file into a name that begins > with > "." or into a directory beginning with "." and then move it to the > intended > result path when the writing is complete. If I understand right, > file move > is an atomic operation so it should avoid the race condition. > > This may be a simpler solution than trying to apply file locks and > will > probably work on NFS mounts where locks are not guaranteed. > > Cheers, > --Bill > > -- > View this message in context: > http://www.nabble.com/FileProducer-enhancement-suggestion-tp18897335s22882p18897335.html > Sent from the Camel - Users mailing list archive at Nabble.com. >
