import { OnModuleDestroy } from '@nestjs/common';
import { QueuesModuleOptions } from "../../interfaces";
import { QueueMessage, QueuePublisher } from '../../interfaces/mq';
import { MqMessageQueueService } from '../mq-message-queue.service';
import { MqMessageService } from '../mq-message.service';
export declare abstract class RabbitMqPublisher<T> implements OnModuleDestroy, QueuePublisher<T> {
    protected readonly mqMessageService: MqMessageService;
    protected readonly mqMessageQueueService: MqMessageQueueService;
    private readonly logger;
    private readonly url;
    private readonly serviceRole;
    private connection;
    private channel;
    private connectingPromise;
    constructor(mqMessageService: MqMessageService, mqMessageQueueService: MqMessageQueueService);
    abstract options(): QueuesModuleOptions;
    protected shouldPersistToDatabase(): boolean;
    private ensureConnectionAndChannel;
    onModuleDestroy(): Promise<void>;
    private closeConnectionAndChannel;
    publish(message: QueueMessage<T>): Promise<string>;
    private persistToDatabase;
}
//# sourceMappingURL=rabbitmq-publisher.service.d.ts.map