UNPKG

kafka-ts

Version:

**KafkaTS** is a Apache Kafka client library for Node.js. It provides both a low-level API for communicating directly with the Apache Kafka cluster and high-level APIs for publishing and subscribing to Kafka topics.

21 lines (20 loc) 530 B
import { Cluster } from '../cluster'; import { Message } from '../types'; import { ProducerState } from './producer-state'; type ProducerBufferOptions = { nodeId: number; maxBatchSize: number; cluster: Cluster; state: ProducerState; }; export declare class ProducerBuffer { private options; private buffer; private head; private isFlushing; constructor(options: ProducerBufferOptions); enqueue(messages: Message[]): Promise<void>; private flush; private compactBuffer; } export {};