camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From parasmk <>
Subject Re: catch error in producer endpoint
Date Fri, 09 Oct 2009 21:20:27 GMT

Claus Ibsen-2 wrote:
> See the pollStrategy option on this page:
> You can then configure your own poll strategy on the ftp consumer and
> decide what to do in case of FTP server errors.

Hello again,
I tried your suggestion and it worked, partially. The control for my
producer goes to rollback method from
org.apache.camel.PollingConsumerPollStrategy, but Camel does not respond to
whether I send true or false back, it just keeps polling like nothing
happened.  Here's my block in rollback( ... ); I'm expecting the producer
(FTP) to stop polling if it gets an exception:

if ( exception != null ) {
            log.error("Error: " + e.getMessage()); //this message IS logged
at runtime
            return false; //do not retry
        } else
            return true; //keep going

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

View raw message