Lookup and projection regeneration

GetOrderStateReq only reads; RebuildOrderProjectionReq replays the stream and replaces the projection

Lookup and projection regeneration GetOrderStateReq only reads; RebuildOrderProjectionReq replays the stream and replaces the projection GetOrderStateReq Read OrderState Current state GetOrderStateRes RebuildOrderProjectionReq RebuildOrderProjectionReq Replay all OrderId events Ordered event stream Replace projection from fold RebuildOrderProjectionRes Rebuild result Client · Sequence participant Client CommerceApi · Sequence participant CommerceApi Order Read Model · Sequence participant Order Read Model OrderWorkflow · / Order Spot · Sequence participant OrderWorkflow / Order Spot Order Event Store · Sequence participant Order Event Store

Reading vs rebuilding

  • • GetOrderStateReq only reads the read model — it doesn't progress the order. Even if the projection is deleted or inconsistent, it must be rebuildable based on the OrderEventStore alone.
  • • If a process is interrupted after a terminal event was recorded but before the projection reflected it, the resume command first reflects the terminal fold result into the projection, then returns the same state.