Interface MessageBus<OutMsg, InMsg, SubHandlerOpts>

A generalized message bus service interface, which can represent publish/subscribe service, message queue or any producer-consumer model.

interface MessageBus {
    dispatch(message, options?): MaybePromise<void>;
    subscribe(handler, options?): MaybePromise<Unsubscribe>;
}

Type Parameters

  • OutMsg

  • InMsg = OutMsg

  • SubHandlerOpts = object

Hierarchy

Implemented by

Methods

Generated using TypeDoc