> For the complete documentation index, see [llms.txt](https://theiotlearninginitiative.gitbook.io/internetofthings101/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://theiotlearninginitiative.gitbook.io/internetofthings101/architecture/communications/protocols/mqtt.md).

# MQTT

## MQTT

> MQTT is a light-weight protocol used for Machine to Machine (M2M) communication. MQTT used a publish/subscribe message forwarding model built on top of TCP/IP protocol. [MQTT Homepage](http://mqtt.org/)
>
> MQTT is a machine-to-machine (M2M)/"Internet of Things" connectivity protocol. It was designed as an extremely lightweight publish/subscribe messaging transport. It is useful for connections with remote locations where a small code footprint is required and/or network bandwidth is at a premium.

* [MQTT Protocol Specification](http://www.ibm.com/developerworks/library/ws-mqtt/)
* [HiveMQ MQTT Essentials: Part 1 – Introducing MQTT](http://www.hivemq.com/blog/mqtt-essentials-part-1-introducing-mqtt)
* [HiveMQ MQTT Essentials Wrap-Up](http://www.hivemq.com/blog/mqtt-essentials-wrap-up)
* [HiveMQ MQTT Essentials Part 6: Quality of Service 0, 1 & 2](http://www.hivemq.com/mqtt-essentials-part-6-mqtt-quality-of-service-levels/)

Core Messages

* Connect
* Disconnect
* Publish
* Subscribe
* Unsubscribe

Quality of Services

* 0, 1, 2

Server Implementations

* IBM MQ
* IBM Microbroker
* RSMB
* Mosquitto
* MQTT.js
* Apache ActiveMQ
* RabbitMQ
* [Adafruit MQTT API](https://learn.adafruit.com/adafruit-io/mqtt-api)
* [Microsoft Azure](http://iotmakerdendashboard.azurewebsites.net/install/publish.htm)

Clients

* C/C++/C#
* Java
* Perl
* Python
* PHP
* Rex
* Ruby
* Arduino

## 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.
>
> MQTT (a.k.a. mosquitto) is perfect for mobile and embedded devices because of its lightweight (in processing, memory management and bandwidth) messaging protocol.
>
> For this protocol, notice that it lacks of encryption in its base, otherwise it would add an important overhead to the connection. Security at the application level requires a lot of work.

[Mosquitto Homepage](http://mosquitto.org/)
