import { Logger, OnModuleInit } from '@nestjs/common';
import * as amqp from 'amqplib';
import { QueuesModuleOptions } from "../../interfaces";
import { QueueMessage, QueueSubscriber } from '../../interfaces/mq';
import { MqMessageQueueService } from '../mq-message-queue.service';
import { MqMessageService } from '../mq-message.service';
export declare abstract class RabbitMqSubscriber<T> implements OnModuleInit, QueueSubscriber<T> {
    protected readonly mqMessageService: MqMessageService;
    protected readonly mqMessageQueueService: MqMessageQueueService;
    private _loggerInstance?;
    private readonly url;
    private readonly serviceRole;
    private connection;
    private channel;
    private consumerTag;
    private reconnectPromise;
    private reconnectAttempt;
    private stopping;
    constructor(mqMessageService: MqMessageService, mqMessageQueueService: MqMessageQueueService);
    protected get loggerContext(): string;
    protected get logger(): Logger;
    abstract subscribe(message: QueueMessage<T>): Promise<any>;
    abstract options(): QueuesModuleOptions;
    protected shouldPersistToDatabase(): boolean;
    establishConnection(): Promise<amqp.Connection>;
    onModuleInit(): Promise<void>;
    private connectAndConsume;
    private handleProcessingError;
    private publishToFailedQueue;
    private triggerReconnect;
    private reconnectLoop;
    private cleanup;
    private sleep;
    private backoff;
    protected processMessage(message: QueueMessage<T>, rawMessage: any, channel: any, queueName: string): Promise<void>;
    private updateStatusInDatabase;
    private resolveProcessingTimeoutMs;
    private parsePositiveInt;
    private subscribeWithTimeout;
}
//# sourceMappingURL=rabbitmq-subscriber.service.d.ts.map