public interface ConsumerSeekAware
ConsumerSeekAware.ConsumerSeekCallback which can be used to perform a
seek operation.| Modifier and Type | Interface and Description |
|---|---|
static interface |
ConsumerSeekAware.ConsumerSeekCallback
A callback that a listener can invoke to seek to a specific offset.
|
| Modifier and Type | Method and Description |
|---|---|
void |
onIdleContainer(java.util.Map<org.apache.kafka.common.TopicPartition,java.lang.Long> assignments,
ConsumerSeekAware.ConsumerSeekCallback callback)
If the container is configured to emit idle container events, this method is called
when the container idle event is emitted - allowing a seek operation.
|
void |
onPartitionsAssigned(java.util.Map<org.apache.kafka.common.TopicPartition,java.lang.Long> assignments,
ConsumerSeekAware.ConsumerSeekCallback callback)
When using group management, called when partition assignments change.
|
void |
registerSeekCallback(ConsumerSeekAware.ConsumerSeekCallback callback)
Register the callback to use when seeking at some arbitrary time.
|
void registerSeekCallback(ConsumerSeekAware.ConsumerSeekCallback callback)
ConcurrentMessageListenerContainer or the same listener instance in multiple
containers listeners should store the callback in a ThreadLocal.callback - the callback.void onPartitionsAssigned(java.util.Map<org.apache.kafka.common.TopicPartition,java.lang.Long> assignments,
ConsumerSeekAware.ConsumerSeekCallback callback)
assignments - the new assignments and their current offsets.callback - the callback to perform an initial seek after assignment.void onIdleContainer(java.util.Map<org.apache.kafka.common.TopicPartition,java.lang.Long> assignments,
ConsumerSeekAware.ConsumerSeekCallback callback)
assignments - the new assignments and their current offsets.callback - the callback to perform a seek.