Interface KafkaFailureCallback<K,V>

Type Parameters:
K - the key type.
V - the value type.
All Superinterfaces:
org.springframework.util.concurrent.FailureCallback
All Known Subinterfaces:
KafkaSendCallback<K,V>
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 KafkaFailureCallback<K,V> extends org.springframework.util.concurrent.FailureCallback
An enhanced FailureCallback for reporting KafkaProducerExceptions.
Since:
2.5
  • Method Details

    • onFailure

      default void onFailure(Throwable ex)
      Specified by:
      onFailure in interface org.springframework.util.concurrent.FailureCallback
    • onFailure

      void onFailure(KafkaProducerException ex)
      Called when the send fails.
      Parameters:
      ex - the exception.