History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: CAMEL-570
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Claus Ibsen
Reporter: Claus Ibsen
Votes: 1
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Apache Camel

FTPComponent - Add delete/move operation

Created: 02/Jun/08 08:56 PM   Updated: 26/Jul/08 09:37 AM
Component/s: camel-core
Affects Version/s: 1.3.0
Fix Version/s: 1.5.0

Time Tracking:
Issue & Sub-Tasks
Issue Only
Not Specified

File Attachments:
  Size
Zip Archive Licensed for inclusion in ASF works CAMEL-570.zip 2008-06-27 06:36 PM Drew McAuliffe 7 kb

Sub-Tasks  All   Open   

 Description  « Hide
The FTP Component currently does not support an after completion operation such as:
  • delete
  • move
    of the processed file as the File Component does.

ServiceMix FTP Component has such feature.

See forum:
http://www.nabble.com/No-way-to-remove-FTP-SFTP-files--td17612896s22882.html



 All   Comments   Work Log   Change History   Subversion Commits   FishEye   Crucible      Sort Order: Ascending order - Click to sort in descending order
Claus Ibsen - 05/Jun/08 10:44 PM
Drew is working on this. See the user forum.

Drew McAuliffe - 27/Jun/08 06:36 PM
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....


Claus Ibsen - 02/Jul/08 12:57 PM
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.


Claus Ibsen - 26/Jul/08 09:01 AM
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.


Claus Ibsen - 26/Jul/08 09:37 AM
Added the deleteFile option.

Committed revision 680011.