On Wed, Oct 12, 2011 at 8:50 PM, bbuzzard <billy.buzz...@bnsflogistics.com> wrote: > I would like to avoid pulling empty (0 byte) files from a remote FTP server, > but I'm running into problems. > > I'm connecting to a remote FTP Server. I have recursive=true and I am using > the AntPathFilter to select specific files in specific folders for > downloading to my local directory. Once and a while a file write on the > remote FTP server begins, but it is a few seconds later before the file > contains all of its data. The delay is just enough to get around the > readLock=changed strategy. >
You can configure a longer period for the checker in the readLockCheckInterval option. > I tried extending FileChangedExclusiveReadLockStrategy with my own class > that checks the file length first to see if the length is not zero. My new > ReadLockStrategy works as designed when using the local file system, but > doesn't work when checking files on the Remote FTP Server and I'm not sure > why. > > I'm using Camel 2.6 and JDK 1.6.0_2x. If there's a better, proven way to > pull non-empty files from a remote FTP server I would like to hear how to do > it. > > -- > View this message in context: > http://camel.465427.n5.nabble.com/How-do-I-avoid-consuming-zero-byte-files-from-a-remote-FTP-server-tp4896550p4896550.html > Sent from the Camel - Users mailing list archive at Nabble.com. > -- Claus Ibsen ----------------- FuseSource Email: cib...@fusesource.com Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/