public final class SeekUtils
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static org.springframework.util.backoff.FixedBackOff |
DEFAULT_BACK_OFF
The default back off - a
FixedBackOff with 0 interval and
DEFAULT_MAX_FAILURES - 1 retry attempts. |
static int |
DEFAULT_MAX_FAILURES
The number of times a topic/partition/offset can fail before being rejected.
|
| Modifier and Type | Method and Description |
|---|---|
static boolean |
doSeeks(java.util.List<org.apache.kafka.clients.consumer.ConsumerRecord<?,?>> records,
org.apache.kafka.clients.consumer.Consumer<?,?> consumer,
java.lang.Exception exception,
boolean recoverable,
java.util.function.BiPredicate<org.apache.kafka.clients.consumer.ConsumerRecord<?,?>,java.lang.Exception> skipper,
org.springframework.core.log.LogAccessor logger)
Seek records to earliest position, optionally skipping the first.
|
public static final int DEFAULT_MAX_FAILURES
public static final org.springframework.util.backoff.FixedBackOff DEFAULT_BACK_OFF
FixedBackOff with 0 interval and
DEFAULT_MAX_FAILURES - 1 retry attempts.public static boolean doSeeks(java.util.List<org.apache.kafka.clients.consumer.ConsumerRecord<?,?>> records,
org.apache.kafka.clients.consumer.Consumer<?,?> consumer,
java.lang.Exception exception,
boolean recoverable,
java.util.function.BiPredicate<org.apache.kafka.clients.consumer.ConsumerRecord<?,?>,java.lang.Exception> skipper,
org.springframework.core.log.LogAccessor logger)
records - the records.consumer - the consumer.exception - the exceptionrecoverable - true if skipping the first record is allowed.skipper - function to determine whether or not to skip seeking the first.logger - a LogAccessor for seek errors.