March 18, 2018

Apache Camel FTP consumer

In this post I show how to implement a message consumer FTP with Apache Camel FTP Component.This component extends the File Component and provides access to remote file systems over the FTP and SFTP protocols. In this example I make use of the Java DSL to set up the FTP route in the ConsumerRouteBuilder class. The CamelContext adds the FTP route to the application context and starts the message exchanges. I use a Thread.sleep of 30 seconds to simulate a runtime environment for consuming messages. This article comes with the source code which is available online on my github repository camel-ftp-consumer. I’ve also included the console output after a test execution with Maven where a file on the remote FTP server is downloaded and copied into a local directory.


Apache Camel FTP 2.17.3
JDK 1.8
Maven 3.2


SUBVERSION svn co activemq-samples GIT git clone

FTP Component dependency in pom.xml

Run test 

Related posts

Leave a Reply

Your email address will not be published.