camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "kraythe ." <>
Subject Re: Implement readLock with lsof
Date Wed, 11 Dec 2013 16:08:23 GMT

from("file:/mypath?include=.*\\.xlsx&readLock=changed&delay=" + this.config
.fileReadDelay()+ "&moveFailed=Errors&move=Processed")

This sets up a locking strategey delay that will fail to get the read lock
if the file has been changed within fileReadDelay() milliseconds. When the
file is streaming in upload it will not get the upload because the size is
changing, then it will wait for the next delay interval to try again. We
have ours set to 5 min and that handles all possible situation.

*Robert Simmons Jr. MSc. - Lead Java Architect @ EA*
*Author of: Hardcore Java (2003) and Maintainable Java (2012)*
*LinkedIn: **

On Wed, Dec 11, 2013 at 6:56 AM, Martín Steffen

> Hello,
> I have a problem with the "change" readLock strategy when I send a file
> through FTP,
> When I send a file through FTP and occur network issues (package delay,
> lost, etc), then Camel takes an incomplete file due to expiration of
> readLockCheckInterval.
> Are you evaluated the option of use the ¨lsof¨ command (or a similar tool
> that tells if a file is open) as an alternative to readLockCheckInterval?
> Thanks,
> Martin.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message