Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface MqttSubscribeAction

The interface contains the properties of a topic when received.

Hierarchy

  • MqttSubscribeAction

Index

Properties

Optional messageType

messageType: MessageType

The type of the message given as argument of onMessage callback. Default: BUFFER. Note: overwrites the messageType callback specified by the options.

Optional onError

onError: (error: Error) => void

What will be executed in case of a subscribing error. Note: overwrites the onError callback specified by the options.

Type declaration

    • (error: Error): void
    • Parameters

      • error: Error

      Returns void

Optional onMessage

onMessage: (message: string | Buffer) => void

What will be done with the received message. Note: overwrites the onMessage callback specified by the options.

Type declaration

    • (message: string | Buffer): void
    • Parameters

      • message: string | Buffer

      Returns void

topic

topic: string

The topic that will be subscribed.

Generated using TypeDoc