camel-users mailing list archives

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

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.

onException(GenericFileOperationFailedException.class)
     .handled(true)
     .retryWhile(new Predicate() {
          @Override
          public boolean matches(Exchange exchange) {
               System.out.println("in predicate..");
               return false;
          }
     })
     .process(new Processor() {
     @Override
           public void process(Exchange exchange) throws Exception {
                  System.out.println("in precess..");
           }
     });

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-tp5762601.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message