Class FileCheckpointStateStore
java.lang.Object
io.smallrye.reactive.messaging.kafka.commit.FileCheckpointStateStore
- All Implemented Interfaces:
CheckpointStateStore
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionFileCheckpointStateStore
(io.vertx.mutiny.core.Vertx vertx, String consumerGroupId, File stateDir, ProcessingStateCodec codec) -
Method Summary
Modifier and TypeMethodDescriptionio.smallrye.mutiny.Uni<Map<org.apache.kafka.common.TopicPartition,
ProcessingState<?>>> fetchProcessingState
(Collection<org.apache.kafka.common.TopicPartition> partitions) Fetch the latest processing state for given topic-partitions.protected io.smallrye.mutiny.Uni<ProcessingState<?>>
fetchProcessingState
(org.apache.kafka.common.TopicPartition partition) io.smallrye.mutiny.Uni<Void>
persistProcessingState
(Map<org.apache.kafka.common.TopicPartition, ProcessingState<?>> state) Persist the given processing state in the state storeprotected io.smallrye.mutiny.Uni<Void>
persistProcessingState
(org.apache.kafka.common.TopicPartition partition, ProcessingState<?> state) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.smallrye.reactive.messaging.kafka.commit.CheckpointStateStore
close
-
Field Details
-
STATE_STORE_NAME
- See Also:
-
-
Constructor Details
-
FileCheckpointStateStore
public FileCheckpointStateStore(io.vertx.mutiny.core.Vertx vertx, String consumerGroupId, File stateDir, ProcessingStateCodec codec)
-
-
Method Details
-
getStateDir
-
fetchProcessingState
public io.smallrye.mutiny.Uni<Map<org.apache.kafka.common.TopicPartition,ProcessingState<?>>> fetchProcessingState(Collection<org.apache.kafka.common.TopicPartition> partitions) Description copied from interface:CheckpointStateStore
Fetch the latest processing state for given topic-partitions.Called on Vert.x event loop context
- Specified by:
fetchProcessingState
in interfaceCheckpointStateStore
- Parameters:
partitions
- set of topic-partitions- Returns:
- the
Uni
completing with the map of processing state by topic-partition
-
fetchProcessingState
protected io.smallrye.mutiny.Uni<ProcessingState<?>> fetchProcessingState(org.apache.kafka.common.TopicPartition partition) -
persistProcessingState
public io.smallrye.mutiny.Uni<Void> persistProcessingState(Map<org.apache.kafka.common.TopicPartition, ProcessingState<?>> state) Description copied from interface:CheckpointStateStore
Persist the given processing state in the state storeCalled on Vert.x event loop context
- Specified by:
persistProcessingState
in interfaceCheckpointStateStore
- Parameters:
state
- map of processing state by topic-partition- Returns:
- the
Uni
completing when the persist operation is completed.
-
persistProcessingState
protected io.smallrye.mutiny.Uni<Void> persistProcessingState(org.apache.kafka.common.TopicPartition partition, ProcessingState<?> state)
-