Class FileCheckpointStateStore

java.lang.Object
io.smallrye.reactive.messaging.kafka.commit.FileCheckpointStateStore
All Implemented Interfaces:
CheckpointStateStore

public class FileCheckpointStateStore extends Object implements CheckpointStateStore
  • Field Details

  • Constructor Details

    • FileCheckpointStateStore

      public FileCheckpointStateStore(io.vertx.mutiny.core.Vertx vertx, String consumerGroupId, File stateDir, ProcessingStateCodec codec)
  • Method Details

    • getStateDir

      public File 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 interface CheckpointStateStore
      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 store

      Called on Vert.x event loop context

      Specified by:
      persistProcessingState in interface CheckpointStateStore
      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)