> For the complete documentation index, see [llms.txt](https://alfredo-reyes-montero.gitbook.io/iot-bosch/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://alfredo-reyes-montero.gitbook.io/iot-bosch/devices/bosch-xdk-110/protocols/mqtt.md).

# MQTT

MQTT was Initially developed by IBM to create a protocol for minimal battery loss and bandwidth, connecting oil pipelines via satellite connection. It could be define such as a lightweight messaging protocol for small sensors and mobile devices, optimized for high-latency or unreliable networks.

MQTT protocol is based on TCP/IP, and all clients and the broker need to have a TCP/IP Stack.

![](/files/-Lj1NZOkzk1rseWzvSAI)

## Communication Architecture <a href="#communication-architecture" id="communication-architecture"></a>

The communication architecture is based on the client-server model where clients and servers are responsible for specific tasks.\
In general the roles are defined as the following:

* Server: awaits incoming connection requests by clients and provides resources or services
* Client: initiates the communication and requests the server’s content and functionalities

In MQTT there are two kinds of client types:

* Subscriber client: is interested in a special set of data from other publishers and registers as a potential recipient of data whenever it is published to the server
* Publisher client: provides data that can be interesting to subscribers by pushing data to the server whenever the data is changed or needs to be updated
