UNPKG

@logistically/events

Version:

A production-ready event-driven architecture library for NestJS with Redis Streams, comprehensive batching, reliable consumption, and enterprise-grade features.

23 lines (22 loc) 805 B
import { EventHandler, EventConsumerOptions } from './consumer'; import { EventValidator } from '../event-types'; export interface BatchedEventConsumerOptions extends EventConsumerOptions { processBatchInOrder?: boolean; maxConcurrentBatches?: number; } export declare class BatchedEventConsumer { private baseConsumer; private batchHandlers; private config; private activeBatches; private maxConcurrentBatches; constructor(options: BatchedEventConsumerOptions); private handleBatch; private processBatchInOrder; private processBatchConcurrently; private processIndividualMessage; handleMessage(rawMessage: any): Promise<void>; get handlers(): Record<string, EventHandler>; get validator(): EventValidator; get activeBatchCount(): number; }