Skip to content

BaseMessage object

BaseMessage is an object which represents a base message shape used in buses:

type BaseMessage = {
    name: string;
    type: TMessageType;
    body?: any;
    context?: Record<string, any>;
}

TMessageType

TMessageType is a string consisting of one of the 4 possible message types:

  • event
  • command
  • query
  • log