import { Disposable } from "@nivinjoseph/n-util";
import { Redis } from "ioredis";
import { EdaManager } from "../eda-manager.js";
import { Broker } from "./broker.js";
export declare class Consumer implements Disposable {
    private readonly _edaPrefix;
    private readonly _nedaClearTrackedKeysEventName;
    private readonly _nedaDistributedObserverNotifyEventName;
    private readonly _client;
    private readonly _manager;
    private readonly _logger;
    private readonly _topic;
    private readonly _partition;
    private readonly _cleanKeys;
    private readonly _flush;
    private _isDisposed;
    private readonly _maxTrackedSize;
    private readonly _keepTrackedSize;
    private _trackedKeysArray;
    private _trackedKeysSet;
    private _keysToTrack;
    private _consumePromise;
    private _broker;
    private _delayCanceller;
    private _lastReportTime;
    private get _writeIndexKey();
    private get _readIndexKey();
    private get _trackedKeysKey();
    private get _fullId();
    get id(): string;
    constructor(client: Redis, manager: EdaManager, topic: string, partition: number, flush?: boolean);
    registerBroker(broker: Broker): void;
    consume(): void;
    dispose(): Promise<void>;
    awaken(): void;
    private _beginConsume;
    private _attemptRoute;
    private _fetchPartitionWriteAndConsumerPartitionReadIndexes;
    private _incrementConsumerPartitionReadIndex;
    private _retrieveEvent;
    private _batchRetrieveEvents;
    private _clearAllEventTracking;
    private _track;
    private _saveTrackedKeys;
    private _purgeTrackedKeys;
    private _loadTrackedKeys;
    private _decompressEvents;
    private _removeKeys;
}
//# sourceMappingURL=consumer.d.ts.map