import * as amqp from 'amqplib'; import * as Bluebird from 'bluebird'; export interface AmqpOptions { url: string; socketOptions?: { noDelay?: boolean; heartbeat?: number; }; poolSize?: number; name?: string; prefetchCount?: number; } export declare class AmqpChannelPoolService { static DEFAULT_POOL_SIZE: number; private connection; private options; private idleChannelLength; private idleChannels; private initResolver; constructor(); initialize(options: AmqpOptions): Promise; getPrefetchCount(): (number | undefined); waitForInit(): Promise; purge(): Promise; acquireChannel(): Promise; releaseChannel(channel: amqp.Channel, reusable?: boolean): Promise; usingChannel(task: (channel: amqp.Channel) => PromiseLike): Promise; getChannelDisposer(): Bluebird.Disposer; private createChannel; private setChannelEventHandler; }