Since Apache Camel version 2.0, the following changes have been made to the File and the FTP components:
Only a directory name can be specified directly in the endpoint, not a
filename. In other words, you must specify a File endpoint with the syntax,
file:
and an FTP component with the syntax,
directoryName[?options]ftp://[.
It is still possible to select individual files, however, by appending the
username@]hostname[:port]/directoryname[?options]fileName option, which enables you to specify files using the file expression
language.
File producer endpoints and FTP producer endpoints now overwrite existing files by
default (previously, the default behavior was to append to files).You can use the new
fileExist option to specify what happens when a producer attempts to
write a file that already exists. Valid values for the fileExist option
are: Override, Append, Fail, or
Ignore.
![]() | Important |
|---|---|
Both the File component and the FTP component have been extensively rewritten for this
release. In particular, many of the component options have been renamed or modified. It is
recommended that you check the configuration of your File and FTP endpoints against the
latest component documentation—see File2 in |
The JMS correlationId is determined differently to before. Now, JMS always
uses the messageId as the correlationId, if configured to do so by
setting useMessageIDAsCorrelationID to true. If the setting is
false, the JMSCorrelationID header value is used, if present,
and the messageId value is used as a fallback, if the header is not
present.
The Bean component now enforces stricter matching of bean method parameters. Previously,
if a parameter could not be converted to the appropriate type, it was passed as
null. Now, all parameters must be convertible to the relevant types.
The allowMultipleConsumers option has been removed. A Direct endpoint can
now have only one consumer.
Since Apache Camel version 2.2, HTTP proxy configuration is set using
CamelContext properties instead of Java system properties.
Since Apache Camel version 2.3, the HTTP authentication options have been renamed, to avoid
clashing with the username and password URI parameters.
Authentication is now set using the authUsername, authPassword,
and authDomain options. In addition, you must specify the authentication method
using the authMethod option, which can take the values Basic,
Digest, or NTLM.
For the full list of HTTP authentication options, see HTTP in
Since Apache Camel 2.0, these components support request/reply semantics. Endpoints of SEDA or VM type will wait for a reply, if a reply is expected.
Since Apache Camel 2.3, the size of the SEDA queue (which holds incoming exchanges) is unbounded, whereas previously it had a maximum size of 1000.
Since Apache Camel version 2.3, the header key,
MinaConsumer.HEADER_CLOSE_SESSION_WHEN_COMPLETE, is replaced by
MinaConstants.MINA_CLOSE_SESSION_WHEN_COMPLETE.
Since Apache Camel version 2.3, the Jetty component has been upgraded from Jetty 6.1.22 to Jetty 7.0.1. The Jetty API has changed significantly between these two versions. Because Jetty is now hosted at Eclipse, all Java packages have been renamed. If you use the Jetty API directly, you could use the Jetty 6 to Jetty 7 migration tool from Eclipse to simplify the migration of your source code.
Since Apache Camel version 2.3, the CXF component's PAYLOAD mode has been
improved to delegate all SOAP message parsing to CXF.
Since Apache Camel version 2.4, the following changes have been made to the FTP component:
The ftps default port has been changed from 2222 to 21.
The ftps protocol now uses a secure data channel while transferring
files, whereas previously only secure login was enabled. You can now use the
disableSecureDataChannelDefaults, execProt, and
execPbsz options to customize the behavior of the security channel. See
FTP2 in
The FTP base directory can now be specified using an absolute path. In the endpoint
URI, insert two leading forward slashes, //, to specify an absolute path,
as in ftp:admin@someserver//absolutePath/foo/bar?password=secret.
The FTP component now uses a 10 second default connect timeout (for all protocols)
and a 30 second data timeout (for the ftp and ftps protocols
only).