Interface CheckpointStore

All Known Implementing Classes:
BlobCheckpointStore, JedisRedisCheckpointStore

public interface CheckpointStore
An interface that defines the operations for storing and retrieving partition ownership information and checkpoint details for each partition.
See Also:
  • Method Details

    • listOwnership

      Flux<PartitionOwnership> listOwnership(String fullyQualifiedNamespace, String eventHubName, String consumerGroup)
      Called to get the list of all existing partition ownership from the underlying data store. Could return empty results if there are is no existing ownership information.
      Parameters:
      fullyQualifiedNamespace - The fully qualified namespace of the Event Hub. This is likely to be similar to "{your-namespace}.servicebus.windows.net".
      eventHubName - The Event Hub name to get ownership information.
      consumerGroup - The consumer group name.
      Returns:
      A Flux of partition ownership details of all the partitions that have/had an owner.
    • claimOwnership

      Flux<PartitionOwnership> claimOwnership(List<PartitionOwnership> requestedPartitionOwnerships)
      Called to claim ownership of a list of partitions. This will return the list of partitions that were owned successfully.
      Parameters:
      requestedPartitionOwnerships - List of partition ownerships this instance is requesting to own.
      Returns:
      A Flux of partitions this instance successfully claimed ownership.
    • listCheckpoints

      Flux<Checkpoint> listCheckpoints(String fullyQualifiedNamespace, String eventHubName, String consumerGroup)
      Called to get the list of checkpoints from the underlying data store. This method could return empty results if there are no checkpoints available in the data store.
      Parameters:
      fullyQualifiedNamespace - The fully qualified namespace of the Event Hub.
      eventHubName - The Event Hub name to get checkpoint information.
      consumerGroup - The consumer group name associated with the checkpoint.
      Returns:
      A Flux of checkpoints associated with the partitions of the Event Hub.
    • updateCheckpoint

      Mono<Void> updateCheckpoint(Checkpoint checkpoint)
      Updates the checkpoint in the data store for a partition.
      Parameters:
      checkpoint - Checkpoint information containing sequence number and offset to be stored for this partition.
      Returns:
      A Mono that completes when the checkpoint is updated.