Summary
Setting up an MQTT broker on Raspberry Pi. This is an introduction article and a basic configuration guide. As the Mosquitto Broker is basically synonymous with MQTT on the Raspberry Pi, we will focus on this tool in relation to MQTT (there are of course more).
MQTT
MQTT, short for Message Queue Telemetry Transport, is a light weight messaging protocol that enables embedded devices with limited resources to perform asynchronous communication on a constrained network.
Developed by IBM and Eurotech, the MQTT protocol is released as an open standard and being standardized by OASIS (Organization for the Advancement of Structured Information Standard), a non-profit consortium that drives the development, convergence and adoption of open standards for the global information society.
In general, the MQTT environment consists of multiple clients and a server, called broker.
Mosquitto
Mosquitto is an open source (BSD licensed) message broker that implements the MQ Telemetry Transport protocol versions 3.1 and 3.1.1. MQTT provides a lightweight method of carrying out messaging using a publish/subscribe model. This makes it suitable for "machine to machine" messaging such as with low power sensors or mobile devices such as phones, embedded computers or microcontrollers like the Arduino.
Mosquitto Debian Repository
There are many guides urging you to install from source. This obviously is always a good idea, but we will be using istead a Mosquitto Debian Repository. It has been recently made available and it does provide the latest version of Mosquitto to Raspbian, instead of the stale versions before. It is a simple process to attach it.
To install MQTT on your Raspberry Pi, follow our tutorials found in our project IoT Raspberry Pi Device, specifically on the Mosquitto on Raspberry Pi page.
Links
Below are essential links related to this article and the MQTT concept
Technology
- MQTT Specification
- MQTT and DDS Comparison (SlideShare)
- MQTT Topic Trees - a description of an MQTT topic structure our solutions use
Mosquitto
- Mosquitto Home
- Mosquitto Project
- Mosquitto Debian Repository
- Introduction to Mosquitto and MQTT
- Description of Mosquitto Configuration options
C# MQTT
- Description of the M2Mqtt library
- M2Mqtt Nuget Package
- M2Mqtt for .Net : MQTT client for Internet of Things & M2M communication (MSDN)
Windows 10 IoT Core
- Windows IoT Core and MQTT
- GnatMQ: Project to develop a broker (server) for the MQTT protocol, an M2M Internet-of-Things communication protocol based on .Net Framework.
Arduino
External Lists
If you are not feeling intimidated by long link lists, try some of the external repositories
- hobbyquaker's list of awesome MQTT - AWESOME