Setu-TS
    Preparing search index...

    Interface IntegrationEventEnvelope<T>

    The wire shape of a published integration event.

    occurredAt is an ISO-8601 string, not a Date: the in-memory broker's JsonSerializer round-trips payloads through JSON.parse, so a Date would arrive at the consumer as a string regardless of what the producer put in — declaring the field a string is the honest type on every transport. It is named occurredAt (not occurredOn, the Date-typed field the events-plugin DomainEvent carries) so the two cannot be conflated.

    Unknown extra top-level fields are allowed by the consumer's structural check, so an additive envelope change on a later framework version is not a breaking deployment.

    0.6.0

    interface IntegrationEventEnvelope<T = unknown> {
        aggregateId?: string;
        aggregateVersion?: number;
        causationId?: string;
        correlationId?: string;
        data: T;
        id: string;
        occurredAt: string;
        type: string;
        version: number;
    }

    Type Parameters

    • T = unknown

      The payload type the consuming definition's parser produces

    Index
    aggregateId?: string

    ID of the aggregate the event concerns, when supplied.

    aggregateVersion?: number

    Version of the aggregate the event concerns, when supplied.

    causationId?: string

    ID of the event that directly caused this one, when propagated.

    correlationId?: string

    ID of the chain root this event descends from, when propagated.

    data: T

    The event payload, as the producer published it.

    id: string

    Producer-assigned event identity (runtime.uuid()).

    occurredAt: string

    Publish time as an ISO-8601 string (new Date(runtime.now()).toISOString()).

    type: string

    The definition's semantic event name.

    version: number

    The definition's contract version.