Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

REPLAY

Purpose

Stream events back in their original append order for a context, optionally restricted to one event type.

Form

REPLAY [ <event_type:WORD> ]
  FOR <context_id:WORD or STRING>
  [ SINCE <timestamp:STRING> ]
  [ RETURN [ <field:WORD or STRING>, ... ] ]

Variants

  • All event types:
REPLAY FOR <context_id>
  • Only specific event types:
REPLAY <event_type> FOR <context_id>

Examples

REPLAY FOR alice
REPLAY order_shipped FOR customer-99
REPLAY FOR "user:ext:42" SINCE "2025-08-20T09:00:00Z"
REPLAY product FOR user-1 RETURN ["name"]

Behavior

  • Routes to the shard owning the context ID.
  • Preserves original order.
  • If nothing matches: No matching events found.
  • RETURN [ ... ] limits payload fields in the replayed events. Omit or use RETURN [] to include all payload fields. Unknown fields are ignored; core fields (context_id, event_type, timestamp) are always present.