File From Sftp: Apache Camel Download Hot!
The SFTP component is highly configurable via URI parameters. Here are the most important ones for downloading:
: If you don't want to delete or move the file on the server, use this. Camel will keep track of processed files in memory (or via an idempotent repository) to avoid re-downloading. apache camel download file from sftp
: Downloads files from subdirectories within the starting path. The SFTP component is highly configurable via URI parameters
Comprehensive Guide: Downloading Files from SFTP Using Apache Camel : Downloads files from subdirectories within the starting
import org.apache.camel.builder.RouteBuilder; public class SftpDownloadRoute extends RouteBuilder { @Override public void configure() throws Exception { from("sftp://remote-host:22/remote/path" + "?username=myuser" + "&password=mypassword" + "&delete=true") // Deletes the file from server after download .to("file:data/downloads"); } } Use code with caution. 3. Key Configuration Options
: Camel waits until the file size/timestamp stops changing before downloading.
org.apache.camel camel-ftp 4.x.x Use code with caution. 2. Basic SFTP Consumer Route
