This is a message broker that supports version 5.0, 3.1.1, and 3.1 of the MQTT protocol. MQTT provides a method of carrying out messaging using a publish/subscribe model. It is lightweight, both in terms of bandwidth usage and ease of implementation. This makes it particularly useful at the edge of the network where a sensor or other simple device may be implemented using an arduino for example.
By default mosquitto will be installed as a system service, using the default configuration at /snap/mosquitto/current/default_config.conf. If this does not meet your needs, create the file /var/snap/mosquitto/common/mosquitto.conf and this will be used instead. Note that only files inside /var/snap/mosquitto/common can be read by mosquitto, you cannot put other configuration files in /etc/mosquitto.
In addition to the latest channel, there are also the 1.5 and 1.6 channels which you can use to track those versions.
For versions of Ubuntu between 14.04 LTS (Trusty Tahr) and 15.10 (Wily Werewolf), as well as Ubuntu flavours that don’t include snap by default, snap can be installed from the Ubuntu Software Centre by searching for snapd.
Alternatively, snapd can be installed from the command line:
Either log out and back in again, or restart your system, to ensure snap’s paths are updated correctly.
To install mosquitto, simply use the following command: