public class DeadLetterChannel extends RedeliveryErrorHandler
RedeliveryPolicyRedeliveryErrorHandler.RedeliveryDatacamelContext, deadLetter, deadLetterHandleNewException, deadLetterUri, exchangeFormatter, executorService, logger, output, outputAsync, preparingShutdown, redeliveryEnabled, redeliveryPolicy, redeliveryProcessor, retryWhilePolicy, useOriginalMessagePolicyexceptionPolicies, exceptionPolicy, logshutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending| Constructor and Description |
|---|
DeadLetterChannel(CamelContext camelContext,
Processor output,
CamelLogger logger,
Processor redeliveryProcessor,
RedeliveryPolicy redeliveryPolicy,
ExceptionPolicyStrategy exceptionPolicyStrategy,
Processor deadLetter,
String deadLetterUri,
boolean deadLetterHandleException,
boolean useOriginalBodyPolicy,
Predicate retryWhile,
ScheduledExecutorService executorService)
Creates the dead letter channel.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
isDeadLetterChannel()
Whether this error handler handles exhausted errors by moving the exchange to a dead letter channel.
|
protected boolean |
isRunAllowedOnPreparingShutdown() |
void |
process(Exchange exchange)
Processes the message exchange
|
String |
toString() |
defensiveCopyExchangeIfNeeded, deliverToFailureProcessor, deliverToOnRedeliveryProcessor, determineRedeliveryDelay, doShutdown, doStart, doStop, getDeadLetter, getDeadLetterUri, getDefaultHandledPredicate, getLogger, getOutput, getRedeliveryPolicy, handleException, hasNext, isCancelledOrInterrupted, isDeadLetterHandleNewException, isDone, isRedeliveryAllowed, isRunAllowed, isUseOriginalMessagePolicy, next, prepareExchangeAfterFailure, prepareExchangeForContinue, prepareExchangeForRedelivery, prepareShutdown, process, processAsyncErrorHandler, shouldHandleException, supportTransactedaddExceptionPolicy, createDefaultExceptionPolicyStrategy, getExceptionPolicy, setExceptionPolicyaddChildService, removeChildService, shutdown, start, start, stopdoResume, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, suspendpublic DeadLetterChannel(CamelContext camelContext, Processor output, CamelLogger logger, Processor redeliveryProcessor, RedeliveryPolicy redeliveryPolicy, ExceptionPolicyStrategy exceptionPolicyStrategy, Processor deadLetter, String deadLetterUri, boolean deadLetterHandleException, boolean useOriginalBodyPolicy, Predicate retryWhile, ScheduledExecutorService executorService)
camelContext - the camel contextoutput - outer processor that should use this dead letter channellogger - logger to use for logging failures and redelivery attemptsredeliveryProcessor - an optional processor to run before redelivery attemptredeliveryPolicy - policy for redeliveryexceptionPolicyStrategy - strategy for onException handlingdeadLetter - the failure processor to send failed exchanges todeadLetterUri - an optional uri for logging purposedeadLetterHandleException - whether dead letter channel should handle (and ignore) exceptions which may be thrown during sending the message to the dead letter endpointuseOriginalBodyPolicy - should the original IN body be moved to the dead letter queue or the current exchange IN body?retryWhile - retry whileexecutorService - the ScheduledExecutorService to be used for redelivery thread pool. Can be null.public void process(Exchange exchange) throws Exception
Processorprocess in interface Processorprocess in class RedeliveryErrorHandlerexchange - the message exchangeException - if an internal processing error has occurred.protected boolean isRunAllowedOnPreparingShutdown()
isRunAllowedOnPreparingShutdown in class RedeliveryErrorHandlerpublic boolean isDeadLetterChannel()
ErrorHandlerSupportisDeadLetterChannel in class ErrorHandlerSupportApache Camel