Class SeekToCurrentBatchErrorHandler

java.lang.Object
org.springframework.kafka.listener.KafkaExceptionLogLevelAware
org.springframework.kafka.listener.SeekToCurrentBatchErrorHandler
All Implemented Interfaces:
BatchErrorHandler, ConsumerAwareBatchErrorHandler, ContainerAwareBatchErrorHandler, GenericErrorHandler<org.apache.kafka.clients.consumer.ConsumerRecords<?,?>>

@Deprecated public class SeekToCurrentBatchErrorHandler extends KafkaExceptionLogLevelAware implements ContainerAwareBatchErrorHandler
Deprecated.
with no replacement - use DefaultErrorHandler with an infinite BackOff.
An error handler that seeks to the current offset for each topic in a batch of records. Used to rewind partitions after a message failure so that the batch can be replayed.
Since:
2.1
  • Constructor Details

    • SeekToCurrentBatchErrorHandler

      public SeekToCurrentBatchErrorHandler()
      Deprecated.
  • Method Details

    • setBackOff

      public void setBackOff(org.springframework.util.backoff.BackOff backOff)
      Deprecated.
      Set a BackOff to suspend the thread after performing the seek. Since this error handler can never "recover" after retries are exhausted, if the back off returns STOP, then the previous interval is used.
      Parameters:
      backOff - the back off.
      Since:
      2.3
    • handle

      public void handle(Exception thrownException, @Nullable org.apache.kafka.clients.consumer.ConsumerRecords<?,?> data, org.apache.kafka.clients.consumer.Consumer<?,?> consumer, MessageListenerContainer container)
      Deprecated.
      Description copied from interface: BatchErrorHandler
      Handle the exception.
      Specified by:
      handle in interface BatchErrorHandler
      Specified by:
      handle in interface ConsumerAwareBatchErrorHandler
      Specified by:
      handle in interface ContainerAwareBatchErrorHandler
      Parameters:
      thrownException - the exception.
      data - the consumer records.
      consumer - the consumer.
      container - the container.
    • clearThreadState

      public void clearThreadState()
      Deprecated.
      Description copied from interface: GenericErrorHandler
      Optional method to clear thread state; will be called just before a consumer thread terminates.
      Specified by:
      clearThreadState in interface GenericErrorHandler<org.apache.kafka.clients.consumer.ConsumerRecords<?,?>>