Events Queue Events Queue protocol schemas
Source: packages/spec/src/kernel/events/queue.zod.ts
import { EventQueueConfigSchema, EventReplayConfigSchema, EventSourcingConfigSchema } from '@objectstack/spec/kernel' ;
import type { EventQueueConfig, EventReplayConfig, EventSourcingConfig } from '@objectstack/spec/kernel' ;
// Validate data
const result = EventQueueConfigSchema. parse (data);
Property Type Required Description name stringoptional (default: "events") Event queue name concurrency integeroptional (default: 10) Max concurrent event handlers retryPolicy { maxRetries: integer; backoffStrategy: Enum<'fixed' | 'linear' | 'exponential'>; initialDelayMs: integer; maxDelayMs: integer }optional Default retry policy for events deadLetterQueue stringoptional Dead letter queue name for failed events priorityEnabled booleanoptional (default: true) Process events based on priority
Property Type Required Description maxRetries integeroptional (default: 3) Max retries for failed events backoffStrategy Enum<'fixed' | 'linear' | 'exponential'>optional (default: "exponential") Backoff strategy initialDelayMs integeroptional (default: 1000) Initial retry delay maxDelayMs integeroptional (default: 60000) Maximum retry delay
Property Type Required Description fromTimestamp string✅ Start timestamp for replay (ISO 8601) toTimestamp stringoptional End timestamp for replay (ISO 8601) eventTypes string[]optional Event types to replay (empty = all) filters Record<string, any>optional Additional filters for event selection speed numberoptional (default: 1) Replay speed multiplier (1 = real-time) targetHandlers string[]optional Handler IDs to execute (empty = all)
Property Type Required Description enabled booleanoptional (default: false) Enable event sourcing snapshotInterval integeroptional (default: 100) Create snapshot every N events snapshotRetention integeroptional (default: 10) Number of snapshots to retain retentionDays integeroptional (default: 365) Days to retain events retention neveroptional [REMOVED] EventSourcingConfig.retention was renamed to retentionDays in @objectstack/spec 17 — the unit of a duration-shaped number lives in the key name, not only in the describe prose. Rename the key to retentionDays; the value (days) is unchanged. The neighbouring snapshotRetention is a COUNT of snapshots, not a duration, so it keeps its name. aggregateTypes string[]optional Aggregate types to enable event sourcing for storage { type: Enum<'database' | 'file' | 's3' | 'eventstore'>; options?: Record<string, any> }optional Event store configuration
Property Type Required Description type Enum<'database' | 'file' | 's3' | 'eventstore'>optional (default: "database") Storage backend options Record<string, any>optional Storage-specific options