MQTT (Messaging Protocol) Flashcards

1
Q

What command is used to publish a message to a topic?

A

mosquitto_pub -h <broker_ip> -t "topic" -m "message"</broker_ip>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What command is used to subscribe to a topic?

A

mosquitto_sub -h <broker_ip> -t "topic"</broker_ip>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What command is used to install MQTT brocker & client?

A

sudo apt install mosquitto mosquitto-clients

How well did you know this?
1
Not at all
2
3
4
5
Perfectly