Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface MqttPublisherAction

The interface contains the action of a topic when published by a publisher.

Hierarchy

  • MqttPublisherAction

Index

Properties

Properties

message

message: string | Buffer | ((data?: any) => string | Buffer)

The message that will be published. It can be a constant value or a function that returns the value. In case it is a function, the function can use the data passed as the second argument when publisher is called.

Optional onError

onError: (error: Error) => void

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

Type declaration

    • (error: Error): void
    • Parameters

      • error: Error

      Returns void

topic

topic: string

The topic that will be published.

Generated using TypeDoc