T - the data type.@FunctionalInterface
public interface GenericErrorHandler<T>
| Modifier and Type | Method and Description |
|---|---|
default void |
clearThreadState()
Optional method to clear thread state; will be called just before a consumer
thread terminates.
|
void |
handle(java.lang.Exception thrownException,
T data)
Handle the exception.
|
default void |
handle(java.lang.Exception thrownException,
T data,
org.apache.kafka.clients.consumer.Consumer<?,?> consumer)
Handle the exception.
|
default boolean |
isAckAfterHandle()
Return true if the offset should be committed for a handled error (no exception
thrown).
|
void handle(java.lang.Exception thrownException,
T data)
thrownException - The exception.data - the data.default void handle(java.lang.Exception thrownException,
T data,
org.apache.kafka.clients.consumer.Consumer<?,?> consumer)
thrownException - The exception.data - the data.consumer - the consumer.default void clearThreadState()
default boolean isAckAfterHandle()