import * as amqp from 'amqplib'; import { Channel } from './channel'; export default class Queue { channel: Channel; name: string; static STOP_PROPAGATION: { stopPropagation: boolean; }; static ERROR_DURING_REPLY: { error: boolean; error_code: number; }; static STOP_STREAM: string; static STOP_STREAM_MESSAGE: { stopStream: boolean; }; defaultOptions: { durable: boolean; noAck: boolean; }; options: amqp.Options.AssertQueue & amqp.Options.Consume; created: Promise; handler: Function; private tag; constructor(channel: Channel, name: string, options: amqp.Options.AssertQueue & amqp.Options.Consume); create(): Promise; subscribe(handler: (msg: any, ack: (error?: any, reply?: any) => any) => any): Promise; unsubscribe(): Promise; static destroy(channel: Channel, name: string): Promise; purge(): Promise; onMessage(msg: amqp.Message): void; static publish(obj: any, properties: amqp.Options.Publish, channel: Channel, name: string, queue?: Queue): Promise; static getReply(obj: any, properties: amqp.Options.Publish, channel: Channel, name: string, queue?: Queue, timeout?: number): Promise; static bindToExchange(exchange: string, routingKey: string, channel: Channel, name: string, queue?: Queue): Promise; static unbindFromExchange(exchange: any, routingKey: any, channel: Channel, name: string, queue?: Queue): Promise; }