/// <reference types="node" />
import amqp from 'amqplib';
import { Options, Replies } from 'amqplib/properties';
import { Logger } from 'log4js';
import { AmqpExchangeInterface } from '../../interface/amqp/amqp-exchange-interface';
import { AmqpExtraInterface } from '../../interface/amqp/amqp-extra-interface';
import { AmqpMessageInterface } from '../../interface/amqp/amqp-message-interface';
import { AmqpQueueInterface } from '../../interface/amqp/amqp-queue-interface';
import { AmqpChannelNamespace } from '../../model/amqp/amqp-channel-namespace';
import { AmqpOriginalConsumerWrapper } from '../../wrapper/amqp-original-consumer-wrapper';
/**
 * Channel Service
 *
 * @since 1.0.0
 * @date 2021-06-02
 * @author Luminous(BGLuminous)
 */
export declare class AmqpChannelService implements AmqpQueueInterface, AmqpExchangeInterface, AmqpMessageInterface, AmqpExtraInterface {
    readonly logger: Logger;
    readonly currentChannelInstance: amqp.Channel | amqp.ConfirmChannel;
    readonly instanceName: string;
    private originalConsumerPool;
    private consumerPosition;
    /**
     * Constructor this need inject current amqp channel instance to create
     *
     * @param {string} name identify name
     * @param {amqp.Channel | amqp.ConfirmChannel} channel current amqp channel
     */
    constructor(name: string, channel: amqp.Channel | amqp.ConfirmChannel);
    /**
     * Add default listener for each connect service instance
     *
     * @private
     */
    private addDefaultListener;
    /**
     * add close event listener
     *
     * @param process event emit callback
     */
    addCloseListener(process: () => void): void;
    /**
     * add error event listener
     *
     * @param process event emit callback
     */
    addErrorListener(process: (err: any) => void): void;
    /**
     * add return event listener
     *
     * @param process event emit callback
     */
    addReturnListener(process: (returnData: any) => void): void;
    /**
     * add drain event listener
     *
     * @param process event emit callback
     */
    addDrainListener(process: () => void): void;
    /**
     * initialize mq exchange/queue/bind
     *
     * @param config  exchange/queue/bind config
     */
    initMetaConfigure(config: AmqpChannelNamespace.MetaConfigure): Promise<void>;
    /**
     * initialize mq queue
     *
     * @param config queue config data
     * @param cleanMode delete then create
     */
    initQueueConfigure(config: AmqpChannelNamespace.AmqpQueue[], cleanMode?: boolean): Promise<void>;
    /**
     * initialize mq exchange
     *
     * @param config  exchange config data
     * @param cleanMode delete then create
     */
    initExchangeConfigure(config: AmqpChannelNamespace.AmqpExchange[], cleanMode?: boolean): Promise<void>;
    /**
     * initialize mq bind
     *
     * @param config bind config data
     */
    initBindConfigure(config: AmqpChannelNamespace.AmqpBind[]): Promise<void>;
    ackAllMessage(): Promise<void>;
    ackMessage(message: amqp.Message, allUp?: boolean): Promise<void>;
    consume(queue: string, processor: (msg: amqp.ConsumeMessage | null) => void, options?: Options.Consume): AmqpOriginalConsumerWrapper;
    getCurrentMessage(queueName: string, options?: Options.Get): Promise<false | amqp.GetMessage>;
    killConsume(consumerName: string): Promise<boolean>;
    nackAllMessage(reQueue?: boolean): Promise<void>;
    recover(): Promise<Replies.Empty>;
    rejectMessage(message: amqp.Message, allUp?: boolean, reQueue?: boolean): Promise<void>;
    sendMessageToExchange(exchangeName: string, key: string, content: Buffer, options?: Options.Publish): Promise<boolean>;
    sendMessageToQueue(queueName: string, content: Buffer, options?: Options.Publish): Promise<boolean>;
    setPrefetchCount(count: number, global?: boolean): Promise<Replies.Empty>;
    bindExchangeToExchange(target: string, from: string, key: string, args?: any): Promise<Replies.Empty>;
    createExchangeIfNotExist(name: string, type: string, options?: Options.AssertExchange): Promise<Replies.AssertExchange>;
    deleteExchange(name: string, options?: Options.DeleteExchange): Promise<Replies.Empty>;
    getExchangeStatus(name: string): Promise<Replies.Empty>;
    unbindExchangeToExchange(target: string, from: string, key: string, args?: any): Promise<Replies.Empty>;
    bindQueueToExchange(name: string, exchange: string, bindKey: string, args?: any): Promise<Replies.Empty>;
    createQueueIfNotExist(name: string, options?: Options.AssertQueue): Promise<Replies.AssertQueue>;
    deleteQueue(name: string, options?: Options.DeleteQueue): Promise<Replies.DeleteQueue>;
    getQueueStatus(name: string): Promise<Replies.AssertQueue>;
    purgeQueue(name: string): Promise<Replies.PurgeQueue>;
    unbindQueueToExchange(name: string, exchange: string, bindKey: string, args?: any): Promise<Replies.Empty>;
    close(): Promise<void>;
    private getNextConsumerName;
}
