camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <>
Subject Re: FTP Component configuration
Date Mon, 24 Nov 2014 11:46:34 GMT

No you cannot do that, you need to set the host/port etc in the uri,
when you define the endpoint as an uri string.

On Sat, Nov 22, 2014 at 7:13 PM, Atanas Shindov
<> wrote:
> Hi guys,
> After I've watched the  Riding Camel
> <>   presentation by
> James Strachan I tried to implement a route where all endpoints are FTP
> based, but instead of configuring each FTP endpoint with hostname, port, and
> login credentials, I wanted to configure all this just once on a
> FtpComponent and have all these configurations automatically applied to all
> my endpoints created with this component. I imagined that Camel would allow
> me to do something like this:
> FtpComponentConfiguration config = new FtpComponentConfiguration();
> config.setHostname("localhost");
> config.setPort("21");
> config.setUsername("user");
> config.setPassword("password");
> FtpComponent ftp = new FtpComponent(config);
> context.addComponent("myFtp", ftp);
> And then my route's DSL would look like this:
> from(myFtp://directory/fromDirectory).to(myFtp://directory/toDirectory);
> However, it looks like that Camel's FTP component can't be used like this
> (or at least I can't find a way to do it) which is very strange considering
> the fact that James used namely FTP as an example to explain the idea behind
> the components. I've used this approach for JMS - you configure a JMS
> component just once with that's necessary (e.g. connection factory), and
> then refer it in each JMS endpoint.
> Am I missing something or the current implementation of FTP does not allow
> this?
> Best regards,
> Atanas
> --
> View this message in context:
> Sent from the Camel - Users mailing list archive at

Claus Ibsen
Red Hat, Inc.
Twitter: davsclaus
Author of Camel in Action:

View raw message