LibraryToggle FramesPrintFeedback

Name

On Exception — Route to be executed when an exception is thrown

Properties

Table 4.9 describes the properties you can specify using the properties editor.

Table 4.9. On Exception Properties

NameDescription
ContinuedSpecifies an expression that determines if the exception is ignored and the original route continues processing after the onException route completes.[a]
languageSpecifies the expression language used to process the expression.
Retry WhileSpecifies an expression that determines if the message causing the exception should be redelivered. The message is redelivered until the expression evaluates to false.[a]
languageSpecifies the expression language used to process the expression.
HandledSpecifies an expression that determines if the exception is marked as handled.[a]
languageSpecifies the expression language used to process the expression.
ExceptionsSpecifies the list of exceptions the node handles. The Add button adds an entry typed in the field. The Delete button removes the selected entry from the list.
Redelivery Policy RefSpecifies a reference to bean defining the redelivery policy.
On Redelivery RefSpecifies a reference to a custom processor for processing the message before it is redelivered.
Inherit Error HandlerSpecifies if the node should use the error handler configured for the route.
Use Original Message PolicySpecifies that message that began the route is placed in the dead letter queue instead of the message that caused the exception.
IdSpecifies a unique identifier for the endpoint. The Id can be used to refer to the endpoint in the Apache Camel configuration file.
DescriptionSpecifies a text description of the bean. The description is included in the generated XML file.

[a] The expression is treated as returning a boolean. If the expression evaluates to any non-boolean value other than null it is evaluated as returning true.


Redelivery Policy

Table 4.10 describes the properties for configuring the redelivery policy.

Table 4.10. Redelivery Properties

NameDescription
Async Delayed Redelivery 
Back Off Multiplier

Specifies the multiplier used to determine the redelivery delay if exponential back-off is enabled. If m is the back-off multiplier and d is the redelivery delay, the sequence of redelivery attempts are then timed as follows:

d, m*d, m*m*d, m*m*m*d, ...
Collision Avoidance FactorSpecifies a factor that is used to randomly tweak the redelivery delay if collision avoidance is enabled. The collision avoidance policy tweaks the next delay by a random amount, up to plus/minus p% of its current value.
Delay Pattern 
Disable RedeliverySpecifies if the redelivery feature is disabled. Redelivery is enabled if Maximum Redeliveries is set to a positive number.
Log Continued 
Log Exhausted 
Log Handled 
Log Retry Attempted 
Log Retry Stack Trace 
Log Stack TraceSpecifies if the JVM stack trace is included in the error logs.
Maximum RedeliveriesSpecifies the maximum number of delivery attempts
Maximum Redelivery DelaySpecifies, in milliseconds, the maximum redelivery delay when using an exponential back-off strategy.
Redelivery DelaySpecifies the delay (in milliseconds) between redelivery attempts.
Retries Exhausted Log LevelSpecifies the logging level at which to log delivery failure.
Retry Attempted Log LevelSpecifies the logging level at which to redelivery attempts.
Use Collision AvoidanceEnables collision avoidance, which adds some randomization to the back-off timings to reduce contention probability.
Use Exponential Back OffEnables exponential backoff.

Comments powered by Disqus