mqtt_sub()

A warning note icon.This section is currently being reworked. We apologize for the inconvenience. If you need immediate assistance, please contact Tibbo Support.


Description:

Subscribes the device to the specified topic on the MQTT server (broker).

Syntax:

sub mqtt_sub(byref data as string, qos as en_qos_choices)

Returns:

---

See Also:

Step-by-step Usage Instructions


Parameter

Description

data

The topic to subscribe to.

qos

Requested quality of service, according to the en_qos_choices

enum.

Details

Callback_mqtt_sub_ok() is called when the subscription is acknowledged by the server.

Hivemq.com is has an excellent explanation of MQTT topics:

http://www.hivemq.com/blog/mqtt-essentials-part-5-mqtt-topics-best-practices

mqtt_sub()

Details