UNPKG

@logistically/events

Version:

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

15 lines (14 loc) 788 B
import { BatchingStrategy, BatchMessage, BatchEnvelope, BatchingTypeStrategy } from '../batching-strategy'; export declare class RedisStreamsBatchingStrategy implements BatchingStrategy { private typePrefix; private batchingTypeStrategy; constructor(typePrefix: string, batchingTypeStrategy?: BatchingTypeStrategy); canBatchTogether(message1: BatchMessage, message2: BatchMessage): boolean; createBatchEnvelope(messages: BatchMessage[]): BatchEnvelope; sendBatch(transport: any, batchEnvelope: BatchEnvelope): Promise<void>; sendIndividualMessages(basePublisher: any, messages: BatchMessage[]): Promise<void>; getBatchStreamName(): string; getBatchingKey(eventType: string): string; private getEventTypePrefix; private getStreamForEventType; }