Currently am working with Apache Camel FTP, How to know that all the folders of the accessed FTP URL are downloaded successfully? As I have all zip files on the FTP URL to download, I want to unzip them once the download is complete, but am not understanding when to unzip them as I don't know the downloading of all the .zip files is completed.
Got Answer!!
from("{{ftp.server}}")
.to("file:target/download")
.log("Downloaded file ${file:name} complete.")
.process(new Processor() {
public void process(Exchange exchange) throws Exception {
boolean isComplete = (Boolean)exchange.getProperties().get("CamelBatchComplete");
});
isComplete will return you true else false, if all the files are downloaded/consumed.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.