Interface RetryListener

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface RetryListener
A listener for retry activity.
Since:
2.7
Author:
Gary Russell
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    failedDelivery(org.apache.kafka.clients.consumer.ConsumerRecord<?,?> record, Exception ex, int deliveryAttempt)
    Called after a delivery failed for a record.
    default void
    recovered(org.apache.kafka.clients.consumer.ConsumerRecord<?,?> record, Exception ex)
    Called after a failing record was successfully recovered.
    default void
    recoveryFailed(org.apache.kafka.clients.consumer.ConsumerRecord<?,?> record, Exception original, Exception failure)
    Called after a recovery attempt failed.
  • Method Details

    • failedDelivery

      void failedDelivery(org.apache.kafka.clients.consumer.ConsumerRecord<?,?> record, Exception ex, int deliveryAttempt)
      Called after a delivery failed for a record.
      Parameters:
      record - the failed record.
      ex - the exception.
      deliveryAttempt - the delivery attempt.
    • recovered

      default void recovered(org.apache.kafka.clients.consumer.ConsumerRecord<?,?> record, Exception ex)
      Called after a failing record was successfully recovered.
      Parameters:
      record - the record.
      ex - the exception.
    • recoveryFailed

      default void recoveryFailed(org.apache.kafka.clients.consumer.ConsumerRecord<?,?> record, Exception original, Exception failure)
      Called after a recovery attempt failed.
      Parameters:
      record - the record.
      original - the original exception causing the recovery attempt.
      failure - the exception thrown by the recoverer.