You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "Freeman, Keith" <kf...@integ.com> on 2014/03/07 22:30:09 UTC
diagnosing onException problem?
I have this code in my route:
onException(Exception.class)
.handled(true)
.maximumRedeliveries(-1)
.redeliveryDelay(1L * 1000L)
.backOffMultiplier(2.0D)
.maximumRedeliveryDelay(60L * 1000L)
.logRetryAttempted(true)
.retryAttemptedLogLevel(LoggingLevel.WARN)
.logRetryStackTrace(true)
.logStackTrace(true)
.log(LoggingLevel.ERROR,
ConfiguredRouteBuilder.class.getSimpleName() +
": onException handler: caught Exception! ${property." +
Exchange.EXCEPTION_CAUGHT + "}")
But when an exception happens, the delay between retries is always 1
second (or whatever I change the redeliveryDelay number to), there's
never any backoff (the retry logs are always 1-second apart). So 2
questions:
1- why isn't the backoff multiplier having any effect?
2- is there a way (short of stepping through Camel source code) for me
to diagnose something like this?
(I'm on camel 2.12.1)
Re: diagnosing onException problem?
Posted by Richard Kettelerij <ri...@gmail.com>.
Are you using this code in a route that is part a transaction? Like a JMS
transaction?
On Fri, Mar 7, 2014 at 10:30 PM, Freeman, Keith <kf...@integ.com> wrote:
> I have this code in my route:
>
> onException(Exception.class)
> .handled(true)
>
> .maximumRedeliveries(-1)
> .redeliveryDelay(1L * 1000L)
> .backOffMultiplier(2.0D)
> .maximumRedeliveryDelay(60L * 1000L)
>
> .logRetryAttempted(true)
> .retryAttemptedLogLevel(LoggingLevel.WARN)
> .logRetryStackTrace(true)
>
> .logStackTrace(true)
> .log(LoggingLevel.ERROR,
> ConfiguredRouteBuilder.class.getSimpleName() +
> ": onException handler: caught Exception! ${property." +
> Exchange.EXCEPTION_CAUGHT + "}")
>
>
> But when an exception happens, the delay between retries is always 1
> second (or whatever I change the redeliveryDelay number to), there's
> never any backoff (the retry logs are always 1-second apart). So 2
> questions:
>
> 1- why isn't the backoff multiplier having any effect?
> 2- is there a way (short of stepping through Camel source code) for me
> to diagnose something like this?
>
> (I'm on camel 2.12.1)
>
>
>
>
>