interface EventView
Defines an event view for building read-side projections in CQRS architectures.
EventView implements the "Q" (Query) side of CQRS, processing domain events to build optimized read models, projections, and materialized views. Views enable efficient querying by maintaining denormalized data structures tailored for specific read patterns.
Key Features: - *\*Event Processing\**: Handles events from multiple streams - \**Consumer Groups\**: Enables load balancing across multiple instances - \**Parallel Processing\**: Configurable concurrency for high throughput - \**Cold/Hot Replay\**: Processes historical events then continues with live events - \**Error Handling\*\*: Built-in error recovery and monitoring
Properties
consumerGroup
Unique consumer group identifier for load balancing.
Multiple view instances with the same consumer group will share event processing, enabling horizontal scaling and fault tolerance.
consumerGroup: string;
handleEvent
Event processing function called for each received event.
Should be idempotent as events may be redelivered during failures. Typically updates read models, projections, or external systems.
handleEvent: (event: EventicleEvent) => Promise<void>;