It works a bit different when its from vs to. The ftp consumer (eg
from) is scheduled based, and you cannot configure redelivery and
whatnot using onException.

It uses the option maximumReconnectAttempts as the max number of
connection attempts before failing. You cannot use onException to
change that.

The ftp consumer if failed, will try to connect again on next poll.

But you can implement a custom poll strategy to influence this a bit
http://camel.apache.org/polling-consumer.html

On Wed, Feb 11, 2015 at 4:08 PM, ekz <ekizo...@gmail.com> wrote:
> Hi Morgan,
> Thanks for the quick reply.
>
> I looked at the page you suggested and also tried with handler,
> But the strange thing is:
> I have another route in which i connect to ftp too. But that route works as
> i expected and retryWhile predicate is checked.
>
> Predicate is considered:
>
>      from("direct:start")
>      .to("ftp://user@host?password=***&disconnect=true&binary=true";)
>
>
> Predicate is not considered:
>
>      from("ftp://user@host?password=***";
>           + "&passiveMode=true&consumer.delay=10000&fastExistsCheck=true"
>           + "&consumer.bridgeErrorHandler=true"
>           + "&throwExceptionOnConnectFailed=true" )
>      .log("");
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/retryWhile-predicate-is-not-called-on-ftp-connection-failure-tp5762601p5762607.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cib...@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/

Reply via email to