import { ApplicationOptionType } from '@/types/ApplicationOptionType';
/**
 * KafkaServer class to manage Kafka consumers and producers.
 * It automatically loads and starts consumers and producers from specified directories.
 */
export declare class KafkaServer {
    private consumersPath;
    private producersPath;
    private consumers;
    private producers;
    private kafkaBroker;
    /**
     * @param config - Configuration for Kafka.
     */
    constructor(config: ApplicationOptionType);
    /**
     * Starts all consumers automatically by dynamically importing and instantiating consumer classes
     * from the specified consumers directory.
     * Each consumer is connected with a clientId and groupId generated from the file name.
     */
    startConsumers(): Promise<void>;
    /**
     * Starts all producers automatically by dynamically importing and instantiating producer classes
     * from the specified producers directory.
     * Each producer is connected with a clientId generated from the file name.
     */
    startProducers(): Promise<void>;
    /**
     * Disconnects all consumers and producers.
     * This method ensures that all active consumers and producers are disconnected.
     */
    disconnectAll(): Promise<void>;
}
//# sourceMappingURL=KafkaServer.d.ts.map