Skip to content

Sequence Diagrams — Message Path and Ownership Changes ​

How messages and partition ownership actually move between named participants. Two scenarios, both sequenceDiagram with autonumber.

Relationship to Use cases and flows: Scenario A's steady-state path below is the same link that page draws as an activity flowchart. Read that page for branch conditions and conservation formulas, this one for participant order and message contents.

Publish Persistence + Consume Delivery (main success path) ​

Exception Branches (summary of the failure paths of the same interaction) ​

Failure pointBehaviorError / state
Invalid tokenReject the connection's first frameERR AUTH_FAILED (generic + 100 ms)
Both followers laggingAck timeout → enter ReadOnlyERR QUORUM_LOST / READ_ONLY_DEGRADED
Old leader rejoinsEpoch fencing: append rejectedSTALE_LEADER_EPOCH (internal)
Consumer without creditMSG scheduling pauses (no mid-frame read stalls)Credit wait (not an error)
PUB replay (client retry)Producer dedup on (producer_id, producer_seq); delivery_id only fences the consume sideIdempotent, no duplicate delivery

Relation to simulation and model checking ​

  • This action sequence is one of the simulation's "golden traces" (the harness injects kill -9 between steps 3–5).
  • "Quorum flushed before commit" is the protocol projection of the lease.qnt invariant visibleImpliesQuorumFlushed.

Scenario A: Consumer-Group Membership Change (incremental rebalance) ​

Scenario B: Lease-Timeout Degraded Election (Prepare/Install) ​

Semantic Anchors ​

InteractionGuaranteeVerification
All of scenario AIncrementality / safety / livenessCB1–CB4; slow-consumer / partition injection
Scenario B: majority promise before InstallNo split braininv_installNeedsQuorumPromise
Scenario B: fencingVisible log never regressesvisibleMonotonic
Shared constraintMetadata mutations go through the single-writer metadata logDECLARE/NOTICE idempotency