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.

29 lines (28 loc) 955 B
import { IsolationLevel } from '../api/fetch'; import { Cluster } from '../cluster'; import { ConsumerMetadata } from './consumer-metadata'; type OffsetManagerOptions = { cluster: Cluster; metadata: ConsumerMetadata; isolationLevel: IsolationLevel; }; export declare class OffsetManager { private options; private currentOffsets; pendingOffsets: Record<string, Record<number, bigint>>; constructor(options: OffsetManagerOptions); getCurrentOffset(topic: string, partition: number): bigint; getPendingOffset(topic: string, partition: number): bigint; resolve(topic: string, partition: number, offset: bigint): void; isResolved(message: { topic: string; partition: number; offset: bigint; }): boolean; flush(topicPartitions: Record<string, Set<number>>): void; fetchOffsets(options: { fromTimestamp: bigint; }): Promise<void>; private listOffsets; } export {};