op: emit

Emit a domain event to the ledger and projection pipeline.

Allowed phases

PhaseStatus
preflight✗ forbidden
core✓ allowed
side_effects✓ allowed

Syntax

- op: emit
  event_type: SHOW_CHECK_IN_CREATED
  payload:
    user_id:  event.user_id
    show_id:  event.show_id
    venue_id: event.venue_id

Parameters

FieldRequiredDescription
event_typeyesDeclared event type under events:
payloadyesKey-value map; values are literals or expressions
target_streamnoEmit on a different stream
target_entitynoTarget entity ID expression

Behavior

  • In core, the emit participates in the same ledger commit as state mutations.
  • In side_effects, the emit runs after commit — failures do not roll back core.
  • Never declare payload fields named type, ts, or entity_id — they are reserved on the envelope.

emit_each · submit

See also