I need to check whether the file downloaded from a ftp location using camel is completed, being downloaded or the connection broke. If completed I need to do a certain function else I need to make another call
Asked
Active
Viewed 196 times
0
-
1One solution is to add a tempPrefix to the fileName being downloaded. So for example if the filename being downloaded is abc.txt, while downloading the file would appear as abc.txt.yourtempprefix and then after completion it will be abc.txt. This way you can identify whether the file is completely downloaded or not. http://camel.apache.org/file2.html – pvpkiran Jun 08 '18 at 10:07
-
How to add prefix to the filename while it is being downloaded – Nexus Jun 08 '18 at 11:06
-
show your route. – pvpkiran Jun 08 '18 at 11:06
1 Answers
2
The FTP
component also has the capabilities of File2
. If you check the docs you'll see options for preMove
, move
, and moveFailed
. You can change the names of files and/or change the location of files before processing, after successful processing, and after failure.

Adam Hawkes
- 7,218
- 30
- 57