Skip to main content
Version: Current

Fetch

@rotorsoft/act-root


@rotorsoft/act-root / act/src / Fetch

Type Alias: Fetch<TEvents>

Fetch<TEvents> = object[]

Defined in: libs/act/src/types/reaction.ts:299

Result of fetching events from the store for processing.

Type Parametersโ€‹

TEventsโ€‹

TEvents extends Schemas

Event schemas.

Type Declarationโ€‹

atโ€‹

readonly at: number

error?โ€‹

readonly optional error?: string

Why this stream's read failed, when it did. Present only on failure, and then events is empty.

Reads are per-stream but ran under one Promise.all, so a single stream's failure rejected the whole cycle and every healthy stream leased alongside it got nothing โ€” a corrupt pii payload on one aggregate stalled unrelated reactions. Isolating the failure here keeps the blast radius on the stream that caused it: the cycle records the error, submits no ack (so the watermark holds), and the stream accrues retry until blockOnError quarantines it the usual way โ€” visible in blocked_streams() instead of silent.

eventsโ€‹

readonly events: Committed<TEvents, keyof TEvents>[]

laggingโ€‹

readonly lagging: boolean

source?โ€‹

readonly optional source?: string

streamโ€‹

readonly stream: string