Skip to main content
Version: v4 (Stable)

Publish

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

Sending message to the broker and subsequently from the broker to any clients subscribing to matching topics.

Parameters:

  • Topic: the topic that the message should be published on
  • Payload: the actual 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.