Package org.apache.camel.model
Class RedeliveryPolicyDefinition
java.lang.Object
org.apache.camel.model.IdentifiedType
org.apache.camel.model.RedeliveryPolicyDefinition
- All Implemented Interfaces:
Cloneable
@Metadata(label="configuration")
public class RedeliveryPolicyDefinition
extends IdentifiedType
implements Cloneable
To configure re-delivery for error handling
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionallowRedeliveryWhileStopping
(boolean allowRedeliveryWhileStopping) Controls whether to allow redelivery while stopping/shutting down a route that uses error handling.allowRedeliveryWhileStopping
(String allowRedeliveryWhileStopping) Controls whether to allow redelivery while stopping/shutting down a route that uses error handling.Allow asynchronous delayed redelivery.backOffMultiplier
(double backOffMultiplier) Sets the back off multiplierbackOffMultiplier
(String backOffMultiplier) Sets the back off multiplier (supports property placeholders)collisionAvoidanceFactor
(double collisionAvoidanceFactor) Sets the collision avoidance factorcollisionAvoidanceFactor
(String collisionAvoidanceFactor) Sets the collision avoidance factor (supports property placeholders)collisionAvoidancePercent
(double collisionAvoidancePercent) Sets the collision avoidance percentagecopy()
delayPattern
(String delayPattern) Sets the delay pattern with delay intervals.exchangeFormatterRef
(String exchangeFormatterRef) Sets the reference of the instance ofExchangeFormatter
to generate the log message from exchange.logContinued
(boolean logContinued) Sets whether continued exceptions should be logged or not.logContinued
(String logContinued) Sets whether continued exceptions should be logged or not (supports property placeholders).logExhausted
(boolean logExhausted) Sets whether exhausted exceptions should be logged or not.logExhausted
(String logExhausted) Sets whether exhausted exceptions should be logged or not (supports property placeholders).logExhaustedMessageBody
(boolean logExhaustedMessageBody) Sets whether exhausted message body should be logged including message history or not (supports property placeholders).logExhaustedMessageBody
(String logExhaustedMessageBody) Sets whether exhausted message body should be logged including message history or not (supports property placeholders).logExhaustedMessageHistory
(boolean logExhaustedMessageHistory) Sets whether exhausted exceptions should be logged including message history or not (supports property placeholders).logExhaustedMessageHistory
(String logExhaustedMessageHistory) Sets whether exhausted exceptions should be logged including message history or not (supports property placeholders).logHandled
(boolean logHandled) Sets whether handled exceptions should be logged or not.logHandled
(String logHandled) Sets whether handled exceptions should be logged or not (supports property placeholders).logNewException
(boolean logNewException) Sets whether new exceptions should be logged or not.logNewException
(String logNewException) Sets whether new exceptions should be logged or not (supports property placeholders).logRetryAttempted
(boolean logRetryAttempted) Sets whether retry attempts should be logged or not.logRetryAttempted
(String logRetryAttempted) Sets whether retry attempts should be logged or not (supports property placeholders).logRetryStackTrace
(boolean logRetryStackTrace) Sets whether stack traces should be logged when an retry attempt failed.logRetryStackTrace
(String logRetryStackTrace) Sets whether stack traces should be logged when an retry attempt failed (supports property placeholders).logStackTrace
(boolean logStackTrace) Sets whether stack traces should be logged.logStackTrace
(String logStackTrace) Sets whether stack traces should be logged (supports property placeholders) Can be used to include or reduce verbose.maximumRedeliveries
(int maximumRedeliveries) Sets the maximum redeliveries x = redeliver at most x times 0 = no redeliveries -1 = redeliver forevermaximumRedeliveries
(String maximumRedeliveries) Sets the maximum redeliveries (supports property placeholders) x = redeliver at most x times 0 = no redeliveries -1 = redeliver forevermaximumRedeliveryDelay
(long maximumRedeliveryDelay) Sets the maximum delay between redeliverymaximumRedeliveryDelay
(String maximumRedeliveryDelay) Sets the maximum delay between redelivery (supports property placeholders)redeliveryDelay
(long delay) Sets the initial redelivery delayredeliveryDelay
(String delay) Sets the initial redelivery delay (supports property placeholders)retriesExhaustedLogLevel
(String retriesExhaustedLogLevel) Sets the logging level to use when retries have been exhaustedretriesExhaustedLogLevel
(org.apache.camel.LoggingLevel retriesExhaustedLogLevel) Sets the logging level to use when retries have been exhaustedretryAttemptedLogInterval
(String retryAttemptedLogInterval) Sets the interval to use for logging retry attemptsretryAttemptedLogLevel
(String retryAttemptedLogLevel) Sets the logging level to use for logging retry attemptsretryAttemptedLogLevel
(org.apache.camel.LoggingLevel retryAttemptedLogLevel) Sets the logging level to use for logging retry attemptsvoid
setAllowRedeliveryWhileStopping
(String allowRedeliveryWhileStopping) void
setAsyncDelayedRedelivery
(String asyncDelayedRedelivery) void
setBackOffMultiplier
(String backOffMultiplier) void
setCollisionAvoidanceFactor
(String collisionAvoidanceFactor) void
setDelayPattern
(String delayPattern) void
setDisableRedelivery
(String disableRedelivery) Disables redelivery (same as setting maximum redeliveries to 0)void
setExchangeFormatterRef
(String exchangeFormatterRef) void
setLogContinued
(String logContinued) void
setLogExhausted
(String logExhausted) void
setLogExhaustedMessageBody
(String logExhaustedMessageBody) void
setLogExhaustedMessageHistory
(String logExhaustedMessageHistory) void
setLogHandled
(String logHandled) void
setLogNewException
(String logNewException) void
setLogRetryAttempted
(String logRetryAttempted) void
setLogRetryStackTrace
(String logRetryStackTrace) void
setLogStackTrace
(String logStackTrace) void
setMaximumRedeliveries
(String maximumRedeliveries) void
setMaximumRedeliveryDelay
(String maximumRedeliveryDelay) void
setRedeliveryDelay
(String redeliveryDelay) void
setRetriesExhaustedLogLevel
(String retriesExhaustedLogLevel) void
setRetryAttemptedLogInterval
(String retryAttemptedLogInterval) void
setRetryAttemptedLogLevel
(String retryAttemptedLogLevel) void
setUseCollisionAvoidance
(String useCollisionAvoidance) void
setUseExponentialBackOff
(String useExponentialBackOff) toString()
Turn on collision avoidance.Turn on exponential backk offMethods inherited from class org.apache.camel.model.IdentifiedType
getId, setId
-
Constructor Details
-
RedeliveryPolicyDefinition
public RedeliveryPolicyDefinition()
-
-
Method Details
-
toString
-
copy
-
asyncDelayedRedelivery
Allow asynchronous delayed redelivery. The route, in particular the consumer's component, must support the Asynchronous Routing Engine (e.g. seda).- Returns:
- the builder
-
allowRedeliveryWhileStopping
public RedeliveryPolicyDefinition allowRedeliveryWhileStopping(boolean allowRedeliveryWhileStopping) Controls whether to allow redelivery while stopping/shutting down a route that uses error handling.- Parameters:
allowRedeliveryWhileStopping
- true to allow redelivery, false to reject redeliveries- Returns:
- the builder
-
allowRedeliveryWhileStopping
Controls whether to allow redelivery while stopping/shutting down a route that uses error handling.- Parameters:
allowRedeliveryWhileStopping
- true to allow redelivery, false to reject redeliveries- Returns:
- the builder
-
backOffMultiplier
Sets the back off multiplier- Parameters:
backOffMultiplier
- the back off multiplier- Returns:
- the builder
-
backOffMultiplier
Sets the back off multiplier (supports property placeholders)- Parameters:
backOffMultiplier
- the back off multiplier- Returns:
- the builder
-
collisionAvoidancePercent
Sets the collision avoidance percentage- Parameters:
collisionAvoidancePercent
- the percentage- Returns:
- the builder
-
collisionAvoidanceFactor
Sets the collision avoidance factor- Parameters:
collisionAvoidanceFactor
- the factor- Returns:
- the builder
-
collisionAvoidanceFactor
Sets the collision avoidance factor (supports property placeholders)- Parameters:
collisionAvoidanceFactor
- the factor- Returns:
- the builder
-
redeliveryDelay
Sets the initial redelivery delay- Parameters:
delay
- delay in millis- Returns:
- the builder
-
redeliveryDelay
Sets the initial redelivery delay (supports property placeholders)- Parameters:
delay
- delay in millis- Returns:
- the builder
-
retriesExhaustedLogLevel
public RedeliveryPolicyDefinition retriesExhaustedLogLevel(org.apache.camel.LoggingLevel retriesExhaustedLogLevel) Sets the logging level to use when retries have been exhausted- Parameters:
retriesExhaustedLogLevel
- the logging level- Returns:
- the builder
-
retriesExhaustedLogLevel
Sets the logging level to use when retries have been exhausted- Parameters:
retriesExhaustedLogLevel
- the logging level- Returns:
- the builder
-
retryAttemptedLogLevel
public RedeliveryPolicyDefinition retryAttemptedLogLevel(org.apache.camel.LoggingLevel retryAttemptedLogLevel) Sets the logging level to use for logging retry attempts- Parameters:
retryAttemptedLogLevel
- the logging level- Returns:
- the builder
-
retryAttemptedLogLevel
Sets the logging level to use for logging retry attempts- Parameters:
retryAttemptedLogLevel
- the logging level- Returns:
- the builder
-
retryAttemptedLogInterval
Sets the interval to use for logging retry attempts- Parameters:
retryAttemptedLogInterval
- the retry logging interval- Returns:
- the builder
-
logStackTrace
Sets whether stack traces should be logged. Can be used to include or reduce verbose.- Parameters:
logStackTrace
- whether stack traces should be logged or not- Returns:
- the builder
-
logStackTrace
Sets whether stack traces should be logged (supports property placeholders) Can be used to include or reduce verbose.- Parameters:
logStackTrace
- whether stack traces should be logged or not- Returns:
- the builder
-
logRetryStackTrace
Sets whether stack traces should be logged when an retry attempt failed. Can be used to include or reduce verbose.- Parameters:
logRetryStackTrace
- whether stack traces should be logged or not- Returns:
- the builder
-
logRetryStackTrace
Sets whether stack traces should be logged when an retry attempt failed (supports property placeholders). Can be used to include or reduce verbose.- Parameters:
logRetryStackTrace
- whether stack traces should be logged or not- Returns:
- the builder
-
logRetryAttempted
Sets whether retry attempts should be logged or not. Can be used to include or reduce verbose.- Parameters:
logRetryAttempted
- whether retry attempts should be logged or not- Returns:
- the builder
-
logRetryAttempted
Sets whether retry attempts should be logged or not (supports property placeholders). Can be used to include or reduce verbose.- Parameters:
logRetryAttempted
- whether retry attempts should be logged or not- Returns:
- the builder
-
logHandled
Sets whether handled exceptions should be logged or not. Can be used to include or reduce verbose.- Parameters:
logHandled
- whether handled exceptions should be logged or not- Returns:
- the builder
-
logHandled
Sets whether handled exceptions should be logged or not (supports property placeholders). Can be used to include or reduce verbose.- Parameters:
logHandled
- whether handled exceptions should be logged or not- Returns:
- the builder
-
logNewException
Sets whether new exceptions should be logged or not. Can be used to include or reduce verbose. A new exception is an exception that was thrown while handling a previous exception.- Parameters:
logNewException
- whether new exceptions should be logged or not- Returns:
- the builder
-
logNewException
Sets whether new exceptions should be logged or not (supports property placeholders). Can be used to include or reduce verbose. A new exception is an exception that was thrown while handling a previous exception.- Parameters:
logNewException
- whether new exceptions should be logged or not- Returns:
- the builder
-
logContinued
Sets whether continued exceptions should be logged or not. Can be used to include or reduce verbose.- Parameters:
logContinued
- whether continued exceptions should be logged or not- Returns:
- the builder
-
logContinued
Sets whether continued exceptions should be logged or not (supports property placeholders). Can be used to include or reduce verbose.- Parameters:
logContinued
- whether continued exceptions should be logged or not- Returns:
- the builder
-
logExhausted
Sets whether exhausted exceptions should be logged or not. Can be used to include or reduce verbose.- Parameters:
logExhausted
- whether exhausted exceptions should be logged or not- Returns:
- the builder
-
logExhausted
Sets whether exhausted exceptions should be logged or not (supports property placeholders). Can be used to include or reduce verbose.- Parameters:
logExhausted
- whether exhausted exceptions should be logged or not- Returns:
- the builder
-
logExhaustedMessageHistory
Sets whether exhausted exceptions should be logged including message history or not (supports property placeholders). Can be used to include or reduce verbose.- Parameters:
logExhaustedMessageHistory
- whether exhausted exceptions should be logged with message history- Returns:
- the builder
-
logExhaustedMessageHistory
Sets whether exhausted exceptions should be logged including message history or not (supports property placeholders). Can be used to include or reduce verbose.- Parameters:
logExhaustedMessageHistory
- whether exhausted exceptions should be logged with message history- Returns:
- the builder
-
logExhaustedMessageBody
Sets whether exhausted message body should be logged including message history or not (supports property placeholders). Can be used to include or reduce verbose. Requires logExhaustedMessageHistory to be enabled.- Parameters:
logExhaustedMessageBody
- whether exhausted message body should be logged with message history- Returns:
- the builder
-
logExhaustedMessageBody
Sets whether exhausted message body should be logged including message history or not (supports property placeholders). Can be used to include or reduce verbose. Requires logExhaustedMessageHistory to be enabled.- Parameters:
logExhaustedMessageBody
- whether exhausted message body should be logged with message history- Returns:
- the builder
-
maximumRedeliveries
Sets the maximum redeliveries- x = redeliver at most x times
- 0 = no redeliveries
- -1 = redeliver forever
- Parameters:
maximumRedeliveries
- the value- Returns:
- the builder
-
maximumRedeliveries
Sets the maximum redeliveries (supports property placeholders)- x = redeliver at most x times
- 0 = no redeliveries
- -1 = redeliver forever
- Parameters:
maximumRedeliveries
- the value- Returns:
- the builder
-
useCollisionAvoidance
Turn on collision avoidance.- Returns:
- the builder
-
useExponentialBackOff
Turn on exponential backk off- Returns:
- the builder
-
maximumRedeliveryDelay
Sets the maximum delay between redelivery- Parameters:
maximumRedeliveryDelay
- the delay in millis- Returns:
- the builder
-
maximumRedeliveryDelay
Sets the maximum delay between redelivery (supports property placeholders)- Parameters:
maximumRedeliveryDelay
- the delay in millis- Returns:
- the builder
-
delayPattern
Sets the delay pattern with delay intervals.- Parameters:
delayPattern
- the delay pattern- Returns:
- the builder
-
exchangeFormatterRef
Sets the reference of the instance ofExchangeFormatter
to generate the log message from exchange.- Parameters:
exchangeFormatterRef
- name of the instance ofExchangeFormatter
- Returns:
- the builder
-
getMaximumRedeliveries
-
setMaximumRedeliveries
-
getRedeliveryDelay
-
setRedeliveryDelay
-
getAsyncDelayedRedelivery
-
setAsyncDelayedRedelivery
-
getBackOffMultiplier
-
setBackOffMultiplier
-
getUseExponentialBackOff
-
setUseExponentialBackOff
-
getCollisionAvoidanceFactor
-
setCollisionAvoidanceFactor
-
getUseCollisionAvoidance
-
setUseCollisionAvoidance
-
getMaximumRedeliveryDelay
-
setMaximumRedeliveryDelay
-
getRetriesExhaustedLogLevel
-
setRetriesExhaustedLogLevel
-
getRetryAttemptedLogLevel
-
setRetryAttemptedLogLevel
-
getRetryAttemptedLogInterval
-
setRetryAttemptedLogInterval
-
getLogRetryAttempted
-
setLogRetryAttempted
-
getLogStackTrace
-
setLogStackTrace
-
getLogRetryStackTrace
-
setLogRetryStackTrace
-
getLogHandled
-
setLogHandled
-
getLogNewException
-
setLogNewException
-
getLogContinued
-
setLogContinued
-
getLogExhausted
-
setLogExhausted
-
getLogExhaustedMessageHistory
-
setLogExhaustedMessageHistory
-
getLogExhaustedMessageBody
-
setLogExhaustedMessageBody
-
getDisableRedelivery
-
setDisableRedelivery
Disables redelivery (same as setting maximum redeliveries to 0) -
getDelayPattern
-
setDelayPattern
-
getAllowRedeliveryWhileStopping
-
setAllowRedeliveryWhileStopping
-
getExchangeFormatterRef
-
setExchangeFormatterRef
-