|
|
|
[
Permlink
| « Hide
]
Claus Ibsen - 05/Jun/08 10:44 PM
Drew is working on this. See the user forum.
Changed the FTPConsumer and the SFTPConsumer to add an "autoDelete" property that will delete files once processed. A couple of notes:
1. The change includes an update to RemoteFileConfiguration, to provide the "autoDelete" property. 2. The code is based on how the fileConsumer works; namely, it handles the read in an async block rather than the way that the files are handled in the current versions of the consumers. 3. I believe I incorporated a recent change to the 1.4 stream related to error processing; files before weren't getting read if there was an error. I think this was actually a problem in the FileConsumer. 4. Using autodelete bypasses the timestamp check. No need to timestamp check if you're just going to delete everything you read. So far these changes are working on our project. We use SFTP to pull files down into a local directory, then a file consumer to read them in from there. This gives us the ability to create backups of what was read, something that the FTP/SFTP consumers don't currently allow. I've said this before and I'll say it again; this would all be a lot easier if there were just one VFS component.... Will work on this after Camel 1.4.0 has been released.
There is also a few other tickets for FTP and File related issues that should be a major target for Camel 1.5 to improve these two important components so Camel works even better with FTP and files. Beware of commons FTP potential problem with listing files on AIX servers. We did see this problem with 1.4.1 today at work. ServiceMix has a delete option only:
http://servicemix.apache.org/servicemix-ftp.html I think we will stick with the delete option for now and let the move go. If anyone want a move option then please create a new issue and vote. Added the deleteFile option.
Committed revision 680011. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||