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.
20 lines (19 loc) • 491 B
TypeScript
/// <reference types="node" />
/// <reference types="node" />
import { EventEmitter } from 'stream';
import { Batch } from '../types';
type ProcessorOptions = {
poll: () => Promise<Batch>;
process: (batch: Batch) => Promise<void>;
};
export declare class Processor extends EventEmitter<{
stopped: [];
}> {
private options;
private isRunning;
constructor(options: ProcessorOptions);
loop(): Promise<void>;
private step;
stop(): Promise<void>;
}
export {};