UNPKG

@midwayjs/rabbitmq

Version:

Midway Framework for rabbitmq

24 lines 1.17 kB
/** * This RabbitMQ Server changed from https://github.com/JeniTurtle/egg-rabbitmq-plus/blob/master/rabbitmq.ts */ /// <reference types="node" /> import * as amqp from 'amqp-connection-manager'; import { IRabbitMQApplication } from './interface'; import { ConsumeMessage } from 'amqplib/properties'; import { RabbitMQListenerOptions, ILogger } from '@midwayjs/core'; import type { Channel } from 'amqplib'; import { EventEmitter } from 'events'; export declare class RabbitMQServer extends EventEmitter implements IRabbitMQApplication { protected channelManagerSet: Set<Channel>; protected connection: amqp.AmqpConnectionManager; protected logger: ILogger; protected reconnectTime: any; constructor(options?: any); bindError(): void; createChannel(isConfirmChannel?: boolean): Promise<any>; connect(url: any, socketOptions: any): Promise<void>; createConsumer(listenerOptions: RabbitMQListenerOptions, listenerCallback: (msg: ConsumeMessage | null, channel: Channel, channelWrapper: any) => Promise<void>): Promise<void>; protected closeConnection(): Promise<void>; close(): Promise<void>; } //# sourceMappingURL=mq.d.ts.map