///
import { Transform } from 'stream';
import { OffsetCommitRequest } from 'kafka-node';
declare namespace CommitStream {
interface CommitFunction {
/**
* @param commits
*/
(commits: OffsetCommitRequest[]): Promise | unknown;
}
export interface Option {
/**
* @brief Callback function that will commit the offset
*/
commitFunction: CommitFunction;
/**
* @brief The interval between two commit
*/
commitInterval: number;
}
export {};
}
/**
* The commit part of the pipeline
*
* @private
*/
declare class CommitStream extends Transform {
private _bufferedOffset;
private _options;
private _forceCommitTimeout?;
private _currentCommitPromise;
private _isDestroyed;
/**
* @param options - Message offset commit option
*/
constructor(options: CommitStream.Option);
private _popBufferedOffset;
private _performCommit;
private _setForceCommitTimeout;
_transform(message: any, unused: any, callback: any): void;
_flush(callback: any): void;
private _internalDestroy;
}
export default CommitStream;