Class DeadLetterChannel

java.lang.Object
org.apache.camel.support.service.BaseService
org.apache.camel.support.service.ServiceSupport
org.apache.camel.support.ChildServiceSupport
All Implemented Interfaces:
AutoCloseable, org.apache.camel.AsyncProcessor, org.apache.camel.Navigate<org.apache.camel.Processor>, org.apache.camel.Processor, org.apache.camel.Service, org.apache.camel.ShutdownableService, org.apache.camel.spi.ErrorHandler, org.apache.camel.spi.ErrorHandlerRedeliveryCustomizer, org.apache.camel.spi.ShutdownPrepared, org.apache.camel.StatefulService, org.apache.camel.SuspendableService

public class DeadLetterChannel extends RedeliveryErrorHandler
Implements a Dead Letter Channel after attempting to redeliver the message using the RedeliveryPolicy
  • Constructor Details

    • DeadLetterChannel

      public DeadLetterChannel(org.apache.camel.CamelContext camelContext, org.apache.camel.Processor output, org.apache.camel.spi.CamelLogger logger, org.apache.camel.Processor redeliveryProcessor, RedeliveryPolicy redeliveryPolicy, org.apache.camel.Processor deadLetter, String deadLetterUri, boolean deadLetterHandleException, boolean useOriginalMessagePolicy, boolean useOriginalBodyPolicy, org.apache.camel.Predicate retryWhile, ScheduledExecutorService executorService, org.apache.camel.Processor onPrepareProcessor, org.apache.camel.Processor onExceptionOccurredProcessor)
      Creates the dead letter channel.
      Parameters:
      camelContext - the camel context
      output - outer processor that should use this dead letter channel
      logger - logger to use for logging failures and redelivery attempts
      redeliveryProcessor - an optional processor to run before redelivery attempt
      redeliveryPolicy - policy for redelivery
      deadLetter - the failure processor to send failed exchanges to
      deadLetterUri - an optional uri for logging purpose
      deadLetterHandleException - whether dead letter channel should handle (and ignore) exceptions which may be thrown during sending the message to the dead letter endpoint
      useOriginalMessagePolicy - should the original IN message be moved to the dead letter queue or the current exchange IN message?
      useOriginalBodyPolicy - should the original IN message body be moved to the dead letter queue or the current exchange IN message body?
      retryWhile - retry while
      executorService - the ScheduledExecutorService to be used for redelivery thread pool. Can be null.
      onPrepareProcessor - a custom Processor to prepare the Exchange before handled by the failure processor / dead letter channel.
      onExceptionOccurredProcessor - a custom Processor to process the Exchange just after an exception was thrown.
  • Method Details