• Apache Camel

Accord Odette FTP Camel Component

The Camel OFTP Component is an adaptor for the Apache Camel framework that enables developers to leverage Odette FTP support on scenarios of file transfer between B2B applications. It is well suited for projects that need to have support for OFTP 1.3, 1.4 and OFTP2 on ESBs (Enterprise Service Bus) like Apache ServiceMix., JEE-based applications and any route-enabled architectures.

Quick Start

To enable OFTP2 support on a Camel project, it is required to add a Maven dependency for the Accord Camel OFTP component:


We hardly recommend to use Apache Maven to integrate this component within your application. If you are not using Maven, you can download Apache Camel's distribution and then download Accord Odette Camel from Maven repository. We are not planing on releasing



You can check more examples on project's unit tests.

How it works

Each endpoint connects to a remote OFTP server. It is possible to send and receive files, as well delivery notifications (EERPs). To receive anything, one must configure the endpoint as consumer, like in the example above.

To send files or Delivery Notifications, the endpoint must be configured as producer. If you want to send and receive files, two routes are needed.

The component will use the same OFTP session to both send and receive data if applicable. This means outgoing data sent to an OFTP endpoint will be actually delivered when a connection is estabilished, saving resources. An internal queue is used to store this outgoing data. In the mean time, incoming data will be sent to endpoint's consumer.

It is, however, possible to have an endpoint with both consumer and producer, but on specific OFTP transfer modes. This is necessary to be able to send Delivery Notifications on different sessions. For instance, when a file arrives but no EERP is sent back automatically.


The Camel OFTP component's URI follows the pattern below:



If URI is preffixed with 'oftps' scheme, then SSL will be enabled

Following the parameter reference table for Camel OFTP's URI:

workpathfalsejava.io.tmpdirIndicates where temporary files will be written
bufferSizefalse4096The buffer size for this endpoint's OFTP connection OFTP
windowSizefalse64The length of each packet window set for this endpoint's OFTP connection
waitForEERPfalsefalseMust the component lock exchange until EERP is received from remote server after uploading a file
transferModefalse* automaticThis endpoint's transfermode. Look enum values of org.neociclo.odetteftp.TransferMode. If not present, transfer mode will be set automatically based on route definition. For example, if it is consumer-only, will be set to RECEIVE_ONLY.
autoReplyDeliveryfalsetrueWill this endpoint automatically send an EERP after a file is received - before consumed by Camel route.
routeFileRequestfalsefalseWill this endpoint route an exchange to warn of incoming file and ask for acceptance and File storage location.
autoResumefalsetrueWill this endpoint automatically resume file transfers if temporary file is found.
copyBeforeSendfalsetrueWill this endpoint copy an outgoing file to the workpath before sending it to the remote server
queueOfferDelayfalse300 msHow long (in ms) will this endpoint wait for exchanges before actually connecting to remote server and offer data (send file / EERP)
maxFileSizefalse0Maximum file size for transfered files within this endpoint. Zero for no check
overridefalsetrueWill this endpoint override any existing file
deletefalsetrueWill this endpoint delete any temporary file after exchange is processed
fileRenameBeanfalsedefault implementationHow files should be named on disk on arrival. Defaults to HEXDATETIME_ORIGINATOR_DATASETNAME. See org.neociclo.accord.odetteftp.camel.FileRenameBean

These parameters are related to SSL-enabled endpoints (oftps://)

sslEngineFactoryDefaultSSLEngineFactoryBean implementing org.neociclo.accord.odetteftp.camel.SSLEngineFactory
trustStoreFileFile storing trusted keys
keyStoreFileFile storing keys
securityProviderSSL Security provider
keyStoreFormatFile format for storing keys
2006-2010 © Neociclo  | Last Published: 2010-10-05 02:57  | Version: 1.2.0-SNAPSHOT