@nestjstools/messaging-rabbitmq-extension
Version:
Extension to handle messages and dispatch them over AMQP protocol
15 lines (14 loc) • 848 B
TypeScript
import { AmqpChannel } from '../channel/amqp.channel';
import { IMessagingConsumer } from '@nestjstools/messaging';
import { ConsumerMessageDispatcher } from '@nestjstools/messaging';
import { OnApplicationShutdown } from '@nestjs/common';
import { ConsumerDispatchedMessageError } from '@nestjstools/messaging';
import { RabbitmqMigrator } from '../migrator/rabbitmq.migrator';
export declare class RabbitmqMessagingConsumer implements IMessagingConsumer<AmqpChannel>, OnApplicationShutdown {
private readonly rabbitMqMigrator;
private channel?;
constructor(rabbitMqMigrator: RabbitmqMigrator);
consume(dispatcher: ConsumerMessageDispatcher, channel: AmqpChannel): Promise<void>;
onError(errored: ConsumerDispatchedMessageError, channel: AmqpChannel): Promise<void>;
onApplicationShutdown(signal?: string): Promise<any>;
}