Represents an event buffered for a specific event source within an event sequence.
Omitted, nil, or empty routing values defer to the kernel's source type,
stream type, and stream id defaults. Explicit nonempty routing is preserved.
occurred: nil leaves timestamp assignment to the kernel; an explicit
DateTime is preserved, including when the event is buffered in a transaction.
Concurrency scopes are independent filters, not routing defaults. A missing
scope sends no explicit constraint for this source; a scope, including none(),
is sent unchanged. For repeated sources, the first declared scope wins.
event_source (a Chronicle.EventSources.EventSource module or name) and
event_stream route this event through a registered definition, overriding any
batch-level :event_source/:event_stream option. An explicit concurrency_scope
always wins over the definition's concurrency dimensions. routing is resolved
internally and not meant to be set.
Rich batches carry routing, tags, subject, and occurred time per event. Their causation and identity remain batch-level: explicit batch causation wins, and the first resolved entry identity wins over the batch identity option. Transaction commits use the first entry's causation and the same resolved-entry identity precedence.
Summary
Types
@type t() :: %Chronicle.EventSequences.EventForEventSourceId{ causation: [Chronicle.Auditing.CausationEntry.t()], concurrency_scope: Chronicle.Events.ConcurrencyScope.t() | keyword() | nil, event: struct(), event_source: module() | String.t() | nil, event_source_id: String.t(), event_source_type: String.t() | nil, event_stream: String.t() | nil, event_stream_id: String.t() | nil, event_stream_type: String.t() | nil, identity: Chronicle.Identity.t() | nil, occurred: DateTime.t() | nil, prepared: %{event_type: struct(), content: String.t()} | nil, routing: Chronicle.EventSources.Routing.t() | nil, subject: String.t() | nil, tags: [String.t()] | nil }