Skip to content

EventLaneOptions

Defined in: packages/client/src/event-lane.ts:109

The Event lane’s client-level flush policy (ADR-0053 consequences). It lives on createSyncClient/defineSyncWorker, NEVER on the registry: the registry is the contract, cadence is deployment tuning, and a batch-size tweak must not surface as a registry diff. Client batching is additionally clamped by the contracts-level request-shape limits, which the server enforces independently.

optional ackedRetentionMs?: number

Defined in: packages/client/src/event-lane.ts:137

How long an acked row is RETAINED in the Outbox after the server accepts it, in ms (ADR-0060). Defaults to 0.

0 is exactly the lane’s original behaviour: an acked verdict DELETES the row on the spot, in the same statement that retires the terminal refused/rejected ones — no stamp, no sweep, no added cost on the default path. Anything greater turns on the acked ledger: the row stays, stamped with acked_at_us, until a sweep retires it that many ms later.

It exists for ONE consumer shape — a best-guess view composing pending Outbox rows with down-synced aggregates. The server accepts an event well BEFORE its consumer folds it, and the folded row syncs back down later still, so a composition that drops the event at the ack dips for the whole ack→fold→sync window. With a retention the acked row is still there to be counted during it. The library takes no position on when the fold landed (it cannot know); the view keeps the row until its own synced value accounts for it, and the retention is the backstop.

Retained rows are NOT pending: they are invisible to batch assembly (never re-posted), to the drain signal { empty }, to diagnostics().outbox, and to the non-forced destroy() refusal. Size it to the deployment’s ack→fold→sync latency plus margin, not to “how long I want the history” — the Outbox is not an archive.


optional backoff?: EventBackoffOptions

Defined in: packages/client/src/event-lane.ts:115

Backoff tuning for deferred rows and for batch-level faults.


optional batchSize?: number

Defined in: packages/client/src/event-lane.ts:111

Events per flush batch. Defaults to DEFAULT_EVENT_BATCH_SIZE; clamped to MAX_EVENTS_PER_BATCH.


optional intervalMs?: number

Defined in: packages/client/src/event-lane.ts:113

The flush driver’s fallback interval. Defaults to DEFAULT_EVENT_FLUSH_INTERVAL_MS.


optional streams?: Record<string, EventStreamFlushOptions>

Defined in: packages/client/src/event-lane.ts:139

Per-Event-stream overrides, keyed by Event-stream name.