Class StorePosition
java.lang.Object
io.fluxcapacitor.common.api.Request
io.fluxcapacitor.common.api.Command
io.fluxcapacitor.common.api.tracking.StorePosition
- All Implemented Interfaces:
JsonType
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns a routing key based on the message type and consumer name.Methods inherited from class io.fluxcapacitor.common.api.Command
getGuarantee
-
Constructor Details
-
StorePosition
public StorePosition()
-
-
Method Details
-
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 classCommand
- Returns:
- a routing key string, or
null
if not specified
-