/// <reference types="node" />
import EventEmitter from 'events';
import { Consumer } from 'kafkajs';
import { SchemaRegistry } from '@kafkajs/confluent-schema-registry';
import { ConfigSubscription } from './buildConfig';
import { PublisherInterface, SubscriptionInterface } from './types';
export declare class Subscription extends EventEmitter implements SubscriptionInterface {
    private readonly consumer;
    private readonly publisher;
    private readonly config;
    private readonly registry?;
    private handlers;
    private readonly aliasToTopic;
    private readonly topicToHandlers;
    private isRunning;
    constructor(consumer: Consumer, publisher: PublisherInterface, config: ConfigSubscription, registry?: SchemaRegistry);
    private addHandler;
    private removeHandler;
    on(event: string | symbol, listener: (...args: never[]) => void): this;
    off(event: string | symbol, listener: (...args: never[]) => void): this;
    private consumeMessage;
    private eachBatchByPartitionKey;
    private eachBatch;
    private subscribe;
    private subscribeAndRun;
    run(): Promise<this>;
    disconnect(): Promise<void>;
}
//# sourceMappingURL=Subscription.d.ts.map