Skip to main content
Version: v4 (Stable)

SetWillMessage

SetWillMessage(topic AS String[, payload AS String[, qos AS Integer [, retain AS Boolean]]]) As Integer

Set Last Will and Testament (LWT) to use for the connection.

Parameters:

  • Topic: the topic that the message should be published on
  • Payload: the message to send.
  • Qos: the quality of service level to use (possible values: 0, 1 or 2).
  • Retain: if set to True, the message will be set as the retained message for the topic.

Returns 0 if success, otherwise the error code.