ObjectStackObjectStack

Events Queue

Events Queue protocol schemas

Event Queue Configuration Schema

Configuration for async event processing queue

@example

{

"name": "event_queue",

"concurrency": 10,

"retryPolicy": {

"maxRetries": 3,

"backoffStrategy": "exponential"

}

}

Source: packages/spec/src/kernel/events/queue.zod.ts

TypeScript Usage

import { EventQueueConfigSchema, EventReplayConfigSchema, EventSourcingConfigSchema } from '@objectstack/spec/kernel';
import type { EventQueueConfig, EventReplayConfig, EventSourcingConfig } from '@objectstack/spec/kernel';

// Validate data
const result = EventQueueConfigSchema.parse(data);

EventQueueConfig

Properties

PropertyTypeRequiredDescription
namestringEvent queue name
concurrencyintegerMax concurrent event handlers
retryPolicy{ maxRetries: integer; backoffStrategy: Enum<'fixed' | 'linear' | 'exponential'>; initialDelayMs: integer; maxDelayMs: integer }optionalDefault retry policy for events
deadLetterQueuestringoptionalDead letter queue name for failed events
priorityEnabledbooleanProcess events based on priority

EventReplayConfig

Properties

PropertyTypeRequiredDescription
fromTimestampstringStart timestamp for replay (ISO 8601)
toTimestampstringoptionalEnd timestamp for replay (ISO 8601)
eventTypesstring[]optionalEvent types to replay (empty = all)
filtersRecord<string, any>optionalAdditional filters for event selection
speednumberReplay speed multiplier (1 = real-time)
targetHandlersstring[]optionalHandler IDs to execute (empty = all)

EventSourcingConfig

Properties

PropertyTypeRequiredDescription
enabledbooleanEnable event sourcing
snapshotIntervalintegerCreate snapshot every N events
snapshotRetentionintegerNumber of snapshots to retain
retentionintegerDays to retain events
aggregateTypesstring[]optionalAggregate types to enable event sourcing for
storage{ type: Enum<'database' | 'file' | 's3' | 'eventstore'>; options?: Record<string, any> }optionalEvent store configuration

On this page