November 2018
Intermediate to advanced
556 pages
14h 42m
English
To install Mosquitto, we can follow the instructions from https://mosquitto.org/download/, or we can use Docker as usual.
$ docker run -it -p 1883:1883 -p 9001:9001 eclipse-mosquitto
$ npm install mqtt-cli -g
$ mqtt-cli localhost topic/hello payload -w
$ mqtt-cli localhost topic/hello "Test hello message"
The outcome should look like this:
$ mqtt-cli localhost topic/hello payload -wTopic: topic/hello ...
Read now
Unlock full access