Complete the command to publish a message 'Hello' to topic 'test/topic' using mosquitto_pub.
mosquitto_pub -t [1] -m "Hello"
The -t option specifies the topic to publish to. Here, 'test/topic' is the correct topic.
Complete the command to subscribe to the topic 'sensor/data' using mosquitto_sub.
mosquitto_sub -t [1]The -t option specifies the topic to subscribe to. 'sensor/data' is the correct topic here.
Fix the error in the command to publish message 'Data' to topic 'home/room' with QoS level 1.
mosquitto_pub -t home/room -m Data -q [1]The -q option sets the QoS level. Valid values are 0, 1, or 2. Here, QoS 1 is required.
Fill both blanks to subscribe to topic 'alerts' with verbose output and clean session disabled.
mosquitto_sub -t [1] [2]
--clean-session which enables clean session.The topic is 'alerts'. The -v option enables verbose output. Clean session is disabled by default, so no extra option is needed here.
Fill all three blanks to publish message 'Update' to topic 'device/status' with retain flag and QoS 2.
mosquitto_pub -t [1] -m [2] [3] -q 2
-d which enables debug mode instead of retain.The topic is 'device/status'. The message must be quoted as "Update". The -r option sets the retain flag.