Mosquitto MQTT is an open-source message broker that implements the MQTT (Message Queuing Telemetry Transport) protocol. Mosquitto is lightweight and is suitable for use on a wide range of devices ranging from low power single board computers to full servers.
The MQTT protocol provides a lightweight method of carrying out messaging using a publish/subscribe model. This makes it suitable for real-time IoT (Internet of Things) messaging such as with low power sensors or mobile devices such as phones, embedded computers or microcontrollers. Some of the factors you will need to consider when evaluating the best choice of MQTT broker for IoT use cases are covered, here: How to Choose the Best MQTT Broker For IoT? | Webbylab.
Mosquitto MQTT enables efficient, bi-directional communication by allowing devices to publish messages (such as sensor data) to specific topics and subscribe to topics to receive relevant information. It supports various QoS (Quality of Service) levels to ensure message delivery reliability and scalability.
The Mosquitto project also provides a C library for implementing MQTT clients, and the very popular mosquitto_pub and mosquitto_sub command line MQTT clients.
Mosquitto is part of the Eclipse Foundation, and is an iot.eclipse.org project. The development is driven by Cedalo.
Details of the MQTT protocol specification are available, here: MQTT Specification.
In MQTT there are a few basic concepts that you need to understand:
In MQTT, a publisher (device/client) publishes messages on a topic and a subscriber must subscribe to that topic to view the message.
The Mosquitto MQTT Publish/Subscribe model
Let's walk through how Mosquitto MQTT works using the example of a temperature sensor on a smart fridge:
This process continues, creating a feedback loop where sensor data is published to specific topics, and various devices or applications subscribe to those topics to receive and act upon the data. Mosquitto MQTT facilitates this communication by efficiently managing the messaging between publishers and subscribers in a lightweight and scalable manner.
Mosquitto MQTT is primarily licensed under the Eclipse Public License (EPL). This license is an open-source license that allows for the use, modification, and distribution of the software, both commercially and non-commercially, while ensuring that any modifications made to the original source code are also open-source and freely available to the community.
Full details of Mosquitto MQTT licensing can be found on the projects GitHub site: see: mosquitto/LICENSE.txt at master · eclipse/mosquitto · GitHub.
The high availability of topics and messages and the balancing of load across brokers are some of the reasons why Mosquitto MQTT brokers are widely used in mission-critical environments today. In such environments, sudden unavailability of the broker, irregularities in load balancing of topics, and slowness in delivery of messages, can significantly delay inter-application communication, badly hit user productivity, and negatively impact both user experience and revenue. To avoid this, administrators must closely monitor the availability and overall performance of the Mosquitto MQTT, proactively detect anomalies, and promptly initiate measures to pre-empt them. This is where eG Enterprise helps!
eG Enterprise is capable of monitoring Mosquitto MQTT out-of-the-box. eG Enterprise's intelligent agents can instantly detect and promptly alert administrators to issues in the uptime and performance of the MQTT by measuring the data sent/received through Publish mode and the messages sent/received on topics. Learn more: How Does eG Enterprise Monitor Mosquitto MQTT? (eginnovations.com).