Introducing MQTT clients
MQTT communication flow consists of a client (which can be a publisher or subscriber and in certain instances, both) and the broker, which manages the flow of all information across different clients. The following diagram provides an overview of how the MQTT message flow works:
Figure 2.1 – MQTT overview
As discussed earlier in this book, MQTT stands for Message Queuing Telemetry Transport. Simply put, it is a communication protocol designed for constrained devices with network limitations. It is designed as a lightweight publish/subscribe messaging protocol. But what does this mean? For this, we need to be familiar with the concepts of messages, topics, clients, and brokers. Let’s cover each and how they work.
MQTT messages
A message is a term given to the data that’s shared between different MQTT clients. It can be some text, sensor readings, and so on.
MQTT topics
Topics are one of the essential...