There are three main benefits of using the MQTT protocol:
- Many-to-many communication.
- The Publisher is unaware of the Subscribers.
- MQTT helps to manage that chaos.
Let’s break it down.
Many-to-many communication is stimulating as it enables ecosystem capabilities. What do I mean by the IoT ecosystem? That is a dynamic group of loosely connected devices that can interact with each other to realize various business use cases. When we introduce a new device to this environment, it increases the overall value of that solution.
That new device can:
- Consume data provided by existing devices.
- Enhance data and deliver it to other members of that ecosystem.
By the other members, I mean not only devices but also the end users.
The fact that the Publisher is unaware of the Subscribers enables that many-to-many communication. Devices producing data should not care about consumers of the provided information. That might sound like a rough assumption, but let me explain. The dynamic nature of the IoT ecosystem enforces that approach. Otherwise, we would have to update every Publisher when introducing a new consumer of the supplied information. That wouldn’t be a sustainable operating model. Deployed Subscriber needs to understand how to pre-process received data; that is the single place we need to implement a change.
How MQTT helps to manage that chaos?
In my previous post, I explained how to design the MQTT Topic structure. The thoughtful layout of MQTT Topics and restrictive (yet generic) access policies allow us to organize this dynamic madness and extract the full potential of the Internet of Things ecosystem.