MQTT::will

Description

This command gets or sets the will-topic, will-message, will-qos, and will-retain fields of MQTT CONNECT messages.

Syntax

MQTT::will topic [<will-topic>]
MQTT::will message [<will-message>]
MQTT::will qos [<will-qos>]
MQTT::will retain [<will-retain-flag>]

MQTT::will topic

  • Get the will-topic field of MQTT CONNECT message.

MQTT::will topic <will-topic>

  • Set the will-topic field of MQTT CONNECT message to specified string.

MQTT::message

  • Get the will-message field of MQTT CONNECT message.

MQTT::will message <will-message>

  • Set the will-message field of MQTT CONNECT message to specified string.

MQTT::will qos

  • Get the will-qos field of MQTT CONNECT message.

MQTT::will qos <will-qos>

  • Set the will-qos field of MQTT CONNECT message to specified number. Will-qos can only be 0, 1, or 2.

MQTT::will retain

  • Get the will-retain field of MQTT CONNECT message.

MQTT::will retain <will-retain>

  • Set the will-retain field of MQTT CONNECT message to specified number. Will-retain-flag can only be 0 or 1.

Examples