Class KafkaErrorSendingMessageRecoverer

java.lang.Object
org.springframework.integration.core.ErrorMessagePublisher
org.springframework.integration.kafka.inbound.KafkaErrorSendingMessageRecoverer
All Implemented Interfaces:
BiConsumer<org.apache.kafka.clients.consumer.ConsumerRecord<?,?>,Exception>, Aware, BeanFactoryAware, org.springframework.kafka.listener.ConsumerRecordRecoverer

public class KafkaErrorSendingMessageRecoverer extends ErrorMessagePublisher implements org.springframework.kafka.listener.ConsumerRecordRecoverer
An extension of ErrorMessagePublisher that can be used in a CommonErrorHandler for recovering Kafka delivery failures.
Since:
6.0
Author:
Gary Russell
  • Constructor Details

    • KafkaErrorSendingMessageRecoverer

      public KafkaErrorSendingMessageRecoverer(MessageChannel channel)
      Construct an instance to send to the channel with the RawRecordHeaderErrorMessageStrategy.
      Parameters:
      channel - the channel.
    • KafkaErrorSendingMessageRecoverer

      public KafkaErrorSendingMessageRecoverer(MessageChannel channel, ErrorMessageStrategy errorMessageStrategy)
      Construct an instance to send the channel, using the error message strategy.
      Parameters:
      channel - the channel.
      errorMessageStrategy - the strategy.
  • Method Details

    • accept

      public void accept(org.apache.kafka.clients.consumer.ConsumerRecord<?,?> record, Exception ex)
      Specified by:
      accept in interface BiConsumer<org.apache.kafka.clients.consumer.ConsumerRecord<?,?>,Exception>