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.
16 lines (15 loc) • 465 B
TypeScript
import { Cluster } from '../cluster';
type ProducerStateOptions = {
cluster: Cluster;
};
export declare class ProducerState {
private options;
producerId: bigint;
private producerEpoch;
private sequences;
constructor(options: ProducerStateOptions);
initProducerId(): Promise<void>;
getSequence(topic: string, partition: number): number;
updateSequence(topic: string, partition: number, messagesCount: number): void;
}
export {};