camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephan Burkard <sburk...@gmail.com>
Subject Re: diagnosing onException problem?
Date Mon, 10 Mar 2014 16:31:52 GMT
Yes, the Java-DSL-example on page 132 is missing it, but on the same page
the book says
"You also have to enable exponential backoff explicitly by setting the
useExponentialBackOff option to true."

;-)
Stephan



On Mon, Mar 10, 2014 at 3:11 PM, Keith Freeman <8forty@gmail.com> wrote:

> Thanks for the tip on useExponentialBackoff(), several examples I found
> using backoffMultiplier() never mentioned that call (including your book,
> Camel In Action, page 132 :).
>
>
> On 03/08/2014 12:23 AM, Claus Ibsen wrote:
>
>> Hi
>>
>> You need to turn on backoff with
>> useExponentialBackOff()
>>
>> And debugging see
>> http://camel.apache.org/how-do-i-debug-my-route.html
>>
>> .. and debugging the source is a bit tougher, but see
>> CamelInternalProcessor which is a central class during Camel routing.
>>
>> On Fri, Mar 7, 2014 at 10:35 PM, Keith Freeman <8forty@gmail.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)
>>>
>>>
>>>
>>>
>>>
>>>
>>
>>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message