Hi

You can provide the name of the file to download as a parameter to the ftp uri.

"ftp://localhost/testfolder/?username=MYUSERNAME&password=MYPASSWORD&localWorkDirectory=/tmp&binary=true?fileName=soap.xml";

Then you do not need to use the choice.

The Camel FTP consumer (eg when you do from("ftp:...") will keep
checking the FTP server for new files to download.
You can configure how often it checks by setting an option named:
delay and its in milliseconds

delay=5000 = 5 seconds

But you can also use a more human readable format by specifying

delay=5m   = 5 minutes
delay=10s = 10 seconds
delay=1h = 1 hour

And so forth.

Also check this FAQ about running Camel standalone
https://cwiki.apache.org/confluence/display/CAMEL/Running+Camel+standalone+and+have+it+keep+running


On Sun, Oct 30, 2011 at 8:20 PM, H Paul <[email protected]> wrote:
> "The journey of 1000 miles begin with 1 step." This is my first small step
> with Camel.
>
> 1. Basically, I want to selectively download only 1 file soap.xml by ftp. Is
> below code is correct way of doing it? Please see code + log
> 2. From log, I saw a lot of repeative things. Is it because of 5 min?
> What is the correct value? 5 to 60 mins?
>
>                        int min=5;
>                        int second=60;
>                        context.start();
>                        Thread.sleep(min*second*1000);
>                        context.stop();
>
> 3. How can we stop the process once the file soap.xml is downloaded? there
> is no need to wait for 5 mins.
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Basic-from-fp-to-file-route-Need-clarification-1M-Thanks-tp4950632p4950632.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: [email protected]
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Reply via email to