UNPKG

reservease.consumer

Version:

This package allows you to create an amqplib consumer and producer.

15 lines (14 loc) 878 B
import { InternalApiResponse } from './InternalApiResponse'; export interface IConsumerService { SubscribeEvents: (message: string) => any; } export declare class RabitQueue { private readonly _connectionUrl; constructor(messageQueueUrl: string); CreateQueueChannel(queue: string): Promise<InternalApiResponse<any>>; CreateExchangeChannel(exchangeName: string): Promise<InternalApiResponse<any>>; SentToQueue(channel: any, queue: string, message: string): Promise<InternalApiResponse<string>>; ConsumeFromQueue(channel: any, queue: string, service: IConsumerService): Promise<void>; SubscribeMessage(channel: any, exchangeName: string, bindingKey: string, service: IConsumerService): Promise<void>; PublishMessage(channel: any, exchangeName: string, bindingKey: string, message: string): Promise<InternalApiResponse<string>>; }