mqtt_sub()
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: |
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.