Skip to content

basalt / events/src / OutboxEntry

Interface: OutboxEntry ​

Defined in: events/src/outbox.ts:13

The transactional outbox pattern: domain events are first written to a durable store — in the SAME transaction as the state change, by passing the transaction handle (outbox.enqueue(event, payload, { tx })) to a store that supports it — then a relay delivers them to external systems and marks them published. Delivery is at-least-once and survives crashes — nothing is lost between "committed" and "delivered".

Properties ​

attempts ​

> attempts: number

Defined in: events/src/outbox.ts:19


createdAt ​

> createdAt: number

Defined in: events/src/outbox.ts:18


event ​

> event: string

Defined in: events/src/outbox.ts:15


id ​

> id: string

Defined in: events/src/outbox.ts:14


lastError? ​

> optional lastError?: string

Defined in: events/src/outbox.ts:21


payload ​

> payload: unknown

Defined in: events/src/outbox.ts:16


publishedAt? ​

> optional publishedAt?: number

Defined in: events/src/outbox.ts:20


tenantId? ​

> optional tenantId?: string

Defined in: events/src/outbox.ts:17

Released under the MIT License.