Class DeadLetterChannelDefinition
java.lang.Object
org.apache.camel.model.IdentifiedType
org.apache.camel.model.errorhandler.DefaultErrorHandlerDefinition
org.apache.camel.model.errorhandler.DeadLetterChannelDefinition
- All Implemented Interfaces:
org.apache.camel.ErrorHandlerFactory
- Direct Known Subclasses:
DeadLetterChannelBuilder
@Metadata(label="configuration,error")
public class DeadLetterChannelDefinition
extends DefaultErrorHandlerDefinition
Error handler with dead letter queue.
-
Constructor Summary
ConstructorsConstructorDescriptionDeadLetterChannelDefinition(String deadLetterUri) DeadLetterChannelDefinition(org.apache.camel.Endpoint deadLetterUri) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.camel.ErrorHandlerFactoryprotected voidprotected RedeliveryPolicyDefinitiondeadLetterHandleNewException(boolean handleNewException) Whether the dead letter channel should handle (and ignore) any new exception that may been thrown during sending the message to the dead letter endpoint.deadLetterUri(String deadLetterUri) The dead letter endpoint uri for the Dead Letter error handler.voidsetDeadLetterHandleNewException(String deadLetterHandleNewException) Whether the dead letter channel should handle (and ignore) any new exception that may been thrown during sending the message to the dead letter endpoint.voidsetDeadLetterUri(String deadLetterUri) The dead letter endpoint uri for the Dead Letter error handler.booleanMethods inherited from class org.apache.camel.model.errorhandler.DefaultErrorHandlerDefinition
allowRedeliveryWhileStopping, asyncDelayedRedelivery, backOffMultiplier, cloneBuilder, collisionAvoidancePercent, delayPattern, disableRedelivery, exchangeFormatterRef, executorService, executorServiceRef, getExecutorServiceBean, getExecutorServiceRef, getLevel, getLoggerBean, getLoggerRef, getLogName, getOnExceptionOccurredProcessor, getOnExceptionOccurredRef, getOnPrepareFailureProcessor, getOnPrepareFailureRef, getOnRedeliveryProcessor, getOnRedeliveryRef, getRedeliveryPolicy, getRedeliveryPolicyRef, getRetryWhilePredicate, getRetryWhileRef, getUseOriginalBody, getUseOriginalMessage, hasRedeliveryPolicy, log, log, log, logExhausted, logExhaustedMessageBody, logExhaustedMessageHistory, logger, loggingLevel, loggingLevel, logHandled, logNewException, logRetryAttempted, logRetryStackTrace, logStackTrace, maximumRedeliveries, maximumRedeliveryDelay, onExceptionOccurred, onExceptionOccurredRef, onPrepareFailure, onPrepareFailureRef, onRedelivery, onRedeliveryRef, redeliveryDelay, redeliveryPolicyRef, retriesExhaustedLogLevel, retryAttemptedLogInterval, retryAttemptedLogLevel, retryWhile, retryWhileRef, setExecutorServiceBean, setExecutorServiceRef, setLevel, setLoggerBean, setLoggerRef, setLogName, setOnExceptionOccurredProcessor, setOnExceptionOccurredRef, setOnPrepareFailureProcessor, setOnPrepareFailureRef, setOnRedeliveryProcessor, setOnRedeliveryRef, setRedeliveryPolicy, setRedeliveryPolicyRef, setRetryWhilePredicate, setRetryWhileRef, setUseOriginalBody, setUseOriginalMessage, useCollisionAvoidance, useExponentialBackOff, useOriginalBody, useOriginalMessageMethods inherited from class org.apache.camel.model.IdentifiedType
getId, setId
-
Constructor Details
-
DeadLetterChannelDefinition
public DeadLetterChannelDefinition() -
DeadLetterChannelDefinition
-
DeadLetterChannelDefinition
public DeadLetterChannelDefinition(org.apache.camel.Endpoint deadLetterUri)
-
-
Method Details
-
createRedeliveryPolicy
- Overrides:
createRedeliveryPolicyin classDefaultErrorHandlerDefinition
-
getDeadLetterUri
-
setDeadLetterUri
The dead letter endpoint uri for the Dead Letter error handler. -
getDeadLetterHandleNewException
-
setDeadLetterHandleNewException
Whether the dead letter channel should handle (and ignore) any new exception that may been thrown during sending the message to the dead letter endpoint. The default value is true which means any such kind of exception is handled and ignored. Set this to false to let the exception be propagated back on theExchange. This can be used in situations where you use transactions, and want to use Camel's dead letter channel to deal with exceptions during routing, but if the dead letter channel itself fails because of a new exception being thrown, then by setting this to false the new exceptions is propagated back and set on theExchange, which allows the transaction to detect the exception, and rollback. -
supportTransacted
public boolean supportTransacted()- Specified by:
supportTransactedin interfaceorg.apache.camel.ErrorHandlerFactory- Overrides:
supportTransactedin classDefaultErrorHandlerDefinition
-
cloneBuilder
public org.apache.camel.ErrorHandlerFactory cloneBuilder()- Specified by:
cloneBuilderin interfaceorg.apache.camel.ErrorHandlerFactory- Overrides:
cloneBuilderin classDefaultErrorHandlerDefinition
-
cloneBuilder
-
deadLetterUri
The dead letter endpoint uri for the Dead Letter error handler. -
deadLetterHandleNewException
Whether the dead letter channel should handle (and ignore) any new exception that may been thrown during sending the message to the dead letter endpoint. The default value is true which means any such kind of exception is handled and ignored. Set this to false to let the exception be propagated back on theExchange. This can be used in situations where you use transactions, and want to use Camel's dead letter channel to deal with exceptions during routing, but if the dead letter channel itself fails because of a new exception being thrown, then by setting this to false the new exceptions is propagated back and set on theExchange, which allows the transaction to detect the exception, and rollback.- Parameters:
handleNewException- true to handle (and ignore), false to catch and propagated the exception on theExchange- Returns:
- the builder
-