MQTT architecture

MQTT works on a publish/subscribe architecture. Publishing is like broadcasting data on a particular channel and subscribing is like listening or receiving the data from a particular channel or source. It is an event-driven communication protocol where messages are pushed to clients; they do not need to pull them from the server as in the HTTP protocol. Here, the central communication server is an MQTT Broker, as seen in Figure 3.8:

Figure 3.8

The central broker is responsible for dispatching all the messages between senders and receivers. The client/sender after establishing connection with broker publishes a message on ...

Get Internet of Things with Raspberry Pi 3 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.