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.
