Interface RecoveryStrategy
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Called to determine whether a record should be skipped.
- Since:
- 2.7
-
Method Summary
Modifier and TypeMethodDescriptionboolean
recovered
(org.apache.kafka.clients.consumer.ConsumerRecord<?, ?> record, Exception ex, MessageListenerContainer container, org.apache.kafka.clients.consumer.Consumer<?, ?> consumer) Return true if the record should be skipped because it was successfully recovered.
-
Method Details
-
recovered
boolean recovered(org.apache.kafka.clients.consumer.ConsumerRecord<?, ?> record, Exception ex, @Nullable MessageListenerContainer container, @Nullable org.apache.kafka.clients.consumer.Consumer<?, throws InterruptedException?> consumer) Return true if the record should be skipped because it was successfully recovered.- Parameters:
record
- the record.ex
- the exception.container
- the container (or parent if a child container).consumer
- the consumer.- Returns:
- true to skip.
- Throws:
InterruptedException
- if the thread is interrupted.
-