Class StorePosition

All Implemented Interfaces:
JsonType

public class StorePosition extends Command
Command sent to the Flux platform to update the tracked position for a specific consumer and segment range.

This is typically used after a Tracker has successfully processed a MessageBatch, allowing the system to record the latest confirmed index.

Important: The lastIndex can only move forward. Attempts to store a lower index than currently registered will be ignored. This ensures resilience against out-of-order or stale tracker activity (e.g. due to temporary disconnects), and helps prevent split-brain scenarios.

If you need to explicitly lower a segment’s index (e.g. for replay or recovery purposes), use the ResetPosition command instead.

  • Constructor Details

    • StorePosition

      public StorePosition()
  • Method Details

    • routingKey

      public String routingKey()
      Returns a routing key based on the message type and consumer name. This key is used for load balancing and message partitioning in the Flux platform.
      Overrides:
      routingKey in class Command
      Returns:
      a routing key string, or null if not specified