camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen" ...@silverbullet.dk>
Subject RE: Ftp consumer
Date Mon, 15 Sep 2008 09:23:59 GMT
Hi

Yes the ftp consumer uses by default timestamp for discovering new files. However timestamps
on some (maybe most or all) FTP servers sent using the LIST command is not always precise
to the second - only HH:MM (no seconds).

In that regard Camel is not that smart as it uses System.currentTimeMillis for "last run",
and thus with bad luck could miss a file.

I don't encourage using this "timestamp" feature. For instance, if you restart Camel then
it will set the timestamp to 0 and thus download all files again. Maybe I should write something
about this on the wiki. Also timezone is not considered as well.

A different strategy is encouraged, such as renaming or deleting the files after download.
These features are now provided in Camel 1.5 that however hasn't been released yet.



Med venlig hilsen
 
Claus Ibsen
......................................
Silverbullet
Skovsgårdsvænget 21
8362 Hørning
Tlf. +45 2962 7576
Web: www.silverbullet.dk
-----Original Message-----
From: borgel [mailto:borge.lotre@gmail.com] 
Sent: 15. september 2008 11:14
To: camel-user@activemq.apache.org
Subject: Ftp consumer


I have a route that polls a directory on a ftp server. The files are not
always downloaded. It seems like if I create a file locally and then waits a
while before uploading to the ftp server, the file is not consumed by Camel.
Could it be that the file don't get a new time stamp when uploaded and Camel
ignores it?

In Camel 1.5 there is a new property; consumer.deleteFile. If this is set to
true I think Camel should download and delete the file without looking at
the timestamp. 


Btw: Great functionality in Camel 1.5 ftp and file handling!
-- 
View this message in context: http://www.nabble.com/Ftp-consumer-tp19489526s22882p19489526.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message