Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Message

Basic message type

Hierarchy

Index

Constructors

Properties

Methods

Constructors

constructor

  • Create a new message

    Parameters

    • type: types

      the message type

    • msgEncoding: encoding
    • fields: MessageFields

      optional message fields

    • data: Buffer

      the message's data

    • headers: string[]

      additional message headers

    Returns Message

Properties

data

data: Buffer

The message's data

encoding

encoding: encoding

The message encoding

headers

headers: string[]

Additional message headers

Optional id

id: undefined | number

The message ID

Optional topic

topic: undefined | string

A topic associated with the message

type

type: types

The message type

Methods

getInputStream

  • getInputStream(): any
  • Create an input stream from the message's data

    Returns any

    an input stream that can be deserialised