UNPKG

@nestjstools/messaging

Version:

Simplifies asynchronous and synchronous message handling with support for buses, handlers, channels, and consumers. Build scalable, decoupled applications with ease and reliability.

7 lines (6 loc) 364 B
import { ConsumerMessageDispatcher } from './consumer-message-dispatcher'; import { ConsumerDispatchedMessageError } from './consumer-dispatched-message-error'; export interface IMessagingConsumer<T> { consume(dispatcher: ConsumerMessageDispatcher, channel: T): Promise<void>; onError(errored: ConsumerDispatchedMessageError, channel: T): Promise<void>; }