@nestjstools/messaging-nats-extension
Version:
Extension to handle messages and dispatch them over Nats
11 lines (10 loc) • 611 B
TypeScript
import { NatsChannel } from '../channel/nats.channel';
import { IMessagingConsumer, ConsumerDispatchedMessageError, ConsumerMessageBus } from '@nestjstools/messaging';
import { OnApplicationShutdown } from '@nestjs/common';
export declare class NatsMessagingConsumer implements IMessagingConsumer<NatsChannel>, OnApplicationShutdown {
private channel?;
private client?;
consume(dispatcher: ConsumerMessageBus, channel: NatsChannel): Promise<void>;
onError(errored: ConsumerDispatchedMessageError, channel: NatsChannel): Promise<void>;
onApplicationShutdown(signal?: string): Promise<any>;
}