camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ekz <>
Subject retryWhile predicate is not called on ftp connection failure
Date Wed, 11 Feb 2015 12:14:35 GMT

I have an FTP route for consuming files and working fine. When the FTP fails
to connect I want to catch the exception, try for some more and later give
up retrying connection attempt. 
Here is my routes, when i debug, process in onException is working and
printing "in process", but predicate in retryWhile is not working and not
printing "in predicate".

I use camel version 2.14.0.

     .retryWhile(new Predicate() {
          public boolean matches(Exchange exchange) {
               System.out.println("in predicate..");
               return false;
     .process(new Processor() {
           public void process(Exchange exchange) throws Exception {
                  System.out.println("in precess..");

        + "&passiveMode=true&consumer.delay=10000&fastExistsCheck=true"
        + "&consumer.bridgeErrorHandler=true"
        + "&throwExceptionOnConnectFailed=true"

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message