Commanded v1.0.0 Commanded.EventStore.RecordedEvent View Source

Contains the persisted stream identity, type, data, and metadata for a single event.

Events are immutable once recorded.

Recorded event fields

  • event_id - a globally unique UUID to identify the event.

  • event_number - a globally unique, monotonically incrementing and gapless integer used to order the event amongst all events.

  • stream_id - the stream identity for the event.

  • stream_version - the version of the stream for the event.

  • causation_id - an optional UUID identifier used to identify which message you are responding to.

  • correlation_id - an optional UUID identifier used to correlate related messages.

  • data - the serialized event as binary data.

  • metadata - the serialized event metadata as binary data.

  • created_at - the datetime, in UTC, indicating when the event was created.

Link to this section Summary

Link to this section Types

Link to this type

t()

View Source
t() :: %Commanded.EventStore.RecordedEvent{
  causation_id: uuid() | nil,
  correlation_id: uuid() | nil,
  created_at: DateTime.t(),
  data: binary(),
  event_id: uuid(),
  event_number: non_neg_integer(),
  event_type: String.t(),
  metadata: binary(),
  stream_id: String.t(),
  stream_version: non_neg_integer()
}