Courses

Getting to Know the MQTT Protocol

Find out what the MQTT protocol is, how the publish/subscribe model works and why it is essential for IoT and industrial automation in Industry 4.0.

Filippo MaselliControl and Automation Engineer 4 min read

Getting to Know the MQTT Protocol
What is the MQTT protocol?

MQTT (Message Queuing Telemetry Transport) is a lightweight, efficient, message-based communication protocol. It was developed by IBM in the 1990s to monitor oil pipelines remotely, even under low-bandwidth conditions and on unstable networks.

Today, MQTT is one of the most widely adopted protocols in IoT (Internet of Things) and industrial automation, and a true enabler of Industry 4.0. It allows devices, sensors, supervisory systems (SCADA) and cloud platforms to exchange information in a standardized, secure way with low resource consumption.

How does MQTT work?

MQTT is based on a publish/subscribe architecture, mediated by a broker:

  1. Publisher: a device or system that sends data to a topic.
  2. Broker: a server responsible for receiving messages and distributing them to interested parties.
  3. Subscriber: a device or system subscribed to a topic in order to receive the published messages.

This model brings two major advantages:

  • Decoupling: publishers and subscribers do not need to know each other directly, only the broker.
  • Scalability: it makes it simple to connect thousands of devices in real time.

🔹 Practical example: a pressure sensor publishes values to planta1/bomba1/pressao. A SCADA system, a maintenance app and a cloud database can all be subscribed to that same topic and receive the updates simultaneously.

Quality of Service (QoS) in MQTT

The protocol offers three QoS (Quality of Service) levels, providing different degrees of reliability:

  • QoS 0 – at most once: the message is sent, but there is no acknowledgment of receipt.
  • QoS 1 – at least once: the message is acknowledged by the broker and may be received more than once.
  • QoS 2 – exactly once: delivery is confirmed in multiple steps, ensuring the receiver gets only one copy of the message.

This flexibility is essential in industrial applications, where some information can be discarded (such as continuous telemetry data), while other information requires maximum reliability (such as critical alarms).

Security in MQTT

Because it is widely used in internet-connected applications, security is a critical concern. The protocol supports:

  • User and device authentication through username and password.
  • TLS/SSL encryption to protect data in transit.
  • Topic access control, ensuring that only authorized devices publish or subscribe to certain data.

This way, companies can deploy MQTT on industrial networks without compromising the confidentiality and integrity of their information.

MQTT applications in industrial automation

In automation and in the energy sector, MQTT has become an integration standard because of its efficiency. Practical examples include:

Cloud integration: direct compatibility with AWS IoT Core, Azure IoT Hub and Google Cloud IoT, enabling advanced analytics and integration with artificial intelligence.

SCADA integration: software such as Ignition and Elipse E3 offers native MQTT support for reading data in real time.

Remote asset monitoring: ideal for oil platforms, solar and wind farms, water treatment plants and transportation systems.

Automotive industry: real-time monitoring of production lines and predictive maintenance.

Energy and utilities: communication between smart meters and control centers.

Benefits of MQTT in Industry 4.0

✔️ Efficient communication: reduces network traffic.
✔️ Scalability: ideal for millions of connected devices.
✔️ Interoperability: connects systems from different manufacturers without complexity.
✔️ Resilience: keeps communication going even on unstable networks.
✔️ Sparkplug B compatibility: data standardization for industrial environments.
✔️ Big Data and AI integration: collection of structured data for real-time analysis.

MQTT limitations and challenges

Despite its many advantages, the protocol has some limitations that need to be taken into account:

It is not a replacement for hard real-time protocols: for applications where response time is critical down to the millisecond (such as motion control), other protocols may be more suitable.

Broker dependency: the central server becomes a critical point of failure.

Topic management: in very large systems, managing topics can become complex.

Additional security required: although it supports encryption, incorrect configuration can expose sensitive data.

Conclusion

The MQTT protocol is now one of the pillars of Industry 4.0, enabling real-time connectivity between devices, SCADA systems and cloud platforms. Its lightweight, flexible and scalable architecture allows companies to integrate sensors, PLCs and supervisory software in a standardized and efficient way. At the same time, its support for QoS, TLS/SSL security and standardization through Sparkplug B makes it especially well suited to complex industrial environments. However, it is important to consider its limitations and design robust architectures, ensuring broker redundancy and appropriate security policies.

// keep reading

Related articles

See all articles
Courses

What is the Automation Pyramid?

The industrial Automation Pyramid is a visual representation that organizes the different layers of systems and technologies used to automate industrial processes.

PLC

PLC Programmer Course

PLC stands for Programmable Logic Controller, an electronic device used to automate industrial and residential processes…

PLC

What is a PLC?

PLC stands for “Programmable Logic Controller”. It is an electronic device used to control machines and industrial processes.

// from article to practice

Want to really learn automation?

In FM4 courses you program PLCs and SCADA systems hands-on, with step-by-step lessons and instructor support.