MQTT is a lightweight publish/subscribe communications protocol that uses TCP/IP (and other secondary transport mechanisms). It is designed for remote sensors to communicate with controlling devices. The specification is under a royalty-free licence. Interesting features of the protocol include the one-to-many messaging service (publish/subscribe), the Last Will/Testament feature, and the three qualities of service. You can read more about it here.
MQTT was initially released in a partnership between IBM and Arcom in 1998. As of 2021-03, the latest version is v5.0.
Mosquitto is a very popular open-source MQTT broker.
Online test/sandbox brokers:
Mosquitto can be installed on Windows by downloading the pre-compiled binaries. The x64 version will be installed in a path similar to
C:\Program Files\Mosquitto. You will likely want to add that directory path to your system path so that you can call
mosquitto from the command line.
If you have added the installation directory to your system path, you can invoke
By default the above command will start a MQTT broker listening on port
1883. The broker will not run as a daemon, so you can stop the broker with
Ctrl-C (or equivalent).
You can listen to all system topics by subscribing to
If you are experiencing problems when running
mosquitto, you might want to run in verbose mode
-v to print debug information, as by default very little information is printed to the command-line:
$ mosquitto -v
Paho is a popular MQTT client.