Skip to content

What's your UNS maturity level? Get a custom report: Take the UNS Maturity Assessment

Building Industrial IoT Data Streaming Architecture with MQTT

by Kudzai Manditereza
19 min read

As Industry 4.0 drives the shift toward data-driven production, manufacturers need reliable data streaming architectures that bridge operational technology (OT) and information technology (IT). MQTT is central to this transformation. In industrial contexts, an MQTT-based IIoT streaming architecture is essentially a form of event-driven architecture (EDA), where systems communicate and respond asynchronously by publishing and subscribing to events.

Here is Part 2 of our blog series, A Comprehensive Guide to Industrial IoT Data Streaming, where we will explore why event-driven architecture (EDA) is essential for modern manufacturing, the transformative role of publish-subscribe patterns in industrial IoT, and why MQTT stands out as the ideal protocol for enabling scalable, real-time data streaming across industrial systems.

Why Event-Driven Architecture Matters for Manufacturing

Traditional manufacturing systems operate in silos. Your SCADA system knows what's happening on Line 1, your MES tracks production schedules, and your ERP manages inventory, but getting these systems to communicate effectively has always been a challenge. Event-driven architecture (EDA) changes this paradigm entirely.

Instead of systems constantly asking each other for updates, EDA creates a continuous flow of events that any interested system can consume in real-time. The moment something significant happens, a machine temperature spike, a production milestone, or a quality issue, that information instantly reaches every system and person who needs it.

The Power of Publish-Subscribe in IoT Data Streaming

At its core, EDA implements a publish-subscribe pattern where:

  • Event producers (sensors, PLCs, machines) publish data once to the central hub

  • Event consumers (dashboards, analytics, control systems) subscribe to the topics they need

  • The event broker (MQTT broker) handles routing and delivery

This decoupling is crucial in Industrial IoT scenarios, where many devices and applications must interoperate without tight point-to-point integrations. By adopting EDA, industrial streaming architectures achieve scalable, loosely coupled systems that can handle the volume, velocity, and variety of shop floor data.

Why MQTT is Best Suited for Industrial IoT Data Streaming

MQTT’s Publish-Subscribe Model

At the core of MQTT is a publish-subscribe (pub-sub) messaging pattern, which is inherently decoupled and asynchronous, exactly what event-driven architectures require. Unlike request-response or polling models, pub-sub allows systems to react to events in real time without needing to know who sent or who will consume the data.

This design offers several key advantages for IoT data streaming:

  • Loose Coupling Between Systems: Publishers (e.g., sensors, PLCs) and subscribers (e.g., cloud services, dashboards, AI models) don’t need direct knowledge of each other. This decoupling makes systems easier to scale, maintain, and evolve independently.

  • Real-Time Responsiveness: As soon as a new event occurs (e.g., motor vibration exceeds threshold), it is pushed instantly to all interested subscribers. This supports fast decision-making and real-time automation.

  • Efficient Multicasting: A single MQTT publish can reach multiple subscribers simultaneously, making it highly efficient for scenarios like broadcasting sensor updates to edge analytics, historians, and cloud-based AI systems in parallel.

  • Contextual and Granular Data Routing: MQTT topics support wildcard filtering and deep hierarchies, allowing subscribers to listen to only the events they care about, whether that's one machine or an entire production line.

MQTT's Stateful Architecture

MQTT's stateful nature sets it apart from simple pub-sub systems. The protocol maintains communication state between clients and brokers through several key mechanisms:

The Three Pillars of MQTT-Based IoT Data Streaming Architecture

1. Data Producers

In an MQTT streaming architecture, data producers are the industrial devices and systems that generate data. These include:

Edge Devices and Sensors: Temperature monitors on CNC machines, vibration sensors on pumps, flow meters in chemical processes. Modern industrial sensors increasingly have native MQTT support, making integration straightforward.

PLCs and Controllers: Programmable Logic Controllers can publish status updates, alarm conditions, and process variables to MQTT topics. For legacy equipment, MQTT gateways bridge protocols like Modbus or OPC-UA.

Manufacturing Execution Systems (MES): Production data such as batch completions, quality measurements, and equipment changeovers flow through MQTT topics, making this information immediately available to other systems.

Example Scenario: A packaging line publishes production counts every minute to topic factory/line3/packaging/count, quality measurements to factory/line3/packaging/quality, and alarm states to factory/line3/packaging/alarms.

2. MQTT Brokers

The MQTT broker sits at the heart of your IoT streaming architecture, receiving all published messages and distributing them to subscribers. For industrial deployments, broker selection and topology are critical decisions.

Broker Topologies for Manufacturing
  • Single Factory Deployment: A clustered MQTT broker handles all plant communications, with topics organized hierarchically by production area, line, and equipment.

  • Multi-Site Enterprise: Federated brokers at each facility connect to a central enterprise broker, enabling both local processing and global visibility through selective data replication.

  • Hybrid Edge-Cloud: Edge brokers handle time-critical local communication while forwarding aggregated data to cloud brokers for enterprise analytics.

MQTT Broker Topologies for Manufacturing

3. Data Consumers

Data consumers represent the diverse ecosystem of systems that subscribe to MQTT topics to receive and act on streaming data:

  • Real-Time Processing: Stream processing engines like Apache Flink consume sensor readings to perform continuous analytics, calculating rolling averages, detecting anomalies, or triggering automated responses.

  • Data Persistence: Time-series databases and historians consume equipment telemetry to provide trending dashboards and long-term diagnostics for maintenance teams.

  • Machine Learning and AI: ML models subscribe to event streams for real-time inference, such as predicting machine failures from vibration patterns or optimizing production parameters.

  • Enterprise Integration: ERP systems consume production completion events for inventory updates, while supply chain systems react to quality events to trigger corrective processes.

  • Control Systems: Workflow engines consume events to trigger automated actions—a quality defect event might initiate an automated rejection process or alert maintenance personnel.

Event Processing Styles in IIoT Data Streaming

Understanding how to process streaming data is crucial for extracting value from your MQTT-based streaming architecture. 

Simple Event Processing (SEP)

Each individual event triggers a direct response. Classic examples in manufacturing include:

  • A pressure sensor crossing a safety threshold immediately triggering machine shutdown

  • An Operator action triggering a database entry

  • A temperature alarm directly notifying maintenance personnel

SEP provides the fastest response times and is ideal for safety interlocks and basic automation rules.

Event Stream Processing (ESP)

Continuous processing of data streams to derive rolling insights and trigger decisions based on patterns. Manufacturing applications include:

  • Computing moving averages of machine vibration over time windows

  • Filtering high-frequency sensor streams to detect anomalies

  • Calculating real-time OEE metrics from production events

  • Monitoring energy consumption patterns across multiple machines

ESP systems maintain state as events flow through, enabling sophisticated real-time analytics while maintaining low latency.

Complex Event Processing (CEP)

Analysis of multiple event streams to detect higher-level patterns or situations. Industrial examples include:

  • Correlating temperature spikes with vibration increases across related equipment to predict systemic failures

  • Detecting coordinated anomalies that might indicate supply chain issues

  • Monitoring production sequences to ensure proper assembly order

  • Identifying patterns that suggest preventive maintenance opportunities

CEP engines use sophisticated pattern matching to catch complex phenomena that are only visible when analyzing multiple event streams together.

Characteristics of Good IIoT Data Streaming Architecture

Not all data architectures can handle the demanding environment of industrial operations. A good IoT streaming architecture for manufacturing exhibits several key characteristics:

Scalability

The architecture must scale horizontally to handle increasing numbers of devices and message volume. As more sensors and machines come online or publishing rates increase, the MQTT infrastructure should accommodate the load by adding broker instances, implementing clustering, or using load balancers without major redesign. 

MQTT broker clusters enable distributed message handling where multiple broker instances can share the load while maintaining session state and message delivery. Proper scalability ensures the system can grow from a pilot in one factory to an enterprise-wide messaging backbone spanning dozens of sites, potentially handling millions of concurrent device connections.

Reliability and Fault Tolerance

Industrial processes often run 24/7, so the MQTT infrastructure acting as the central hub of an IoT data streaming architecture must be highly reliable. This includes no single points of failure through MQTT broker clustering, message persistence, and the ability to withstand network outages or hardware failures. 

Security and Network Segmentation

Industrial MQTT deployments require careful security design:

  • Network zones: Separate MQTT brokers for production-critical vs. enterprise systems

  • TLS encryption: All connections secured with transport-layer encryption

  • Certificate-based authentication: Device identity verification through X.509 certificates

  • Topic-level access control: Fine-grained permissions based on roles and responsibilities

Schema Governance and Data Quality

As data from diverse machines flows through the MQTT infrastructure, maintaining consistent formats becomes essential:

  • Schema registries: Central repositories for message structure definitions

  • Version management: Backward-compatible evolution of data formats

  • Data validation: Real-time checking of message structure and content

  • Quality metrics: Monitoring data completeness, accuracy, and timeliness

Modularity and Loosely Coupled Design

Good IoT data streaming architectures embrace modular principles where producers (sensors, PLCs), brokers (MQTT infrastructure), and consumers (analytics, dashboards, control systems) operate as independent components connected only through event streams. This loose coupling enables manufacturing teams to move away from rigid, monolithic legacy systems toward a plug-and-play ecosystem where:

  • New analytics services can be added without disrupting existing data flows

  • Individual component failures don't cascade through the entire system

  • Mixed technology environments thrive (cloud applications alongside on-premises databases)

  • Each component scales and evolves independently while maintaining the same event contracts

This modularity is essential for large-scale Industrial IoT deployments where agility and resilience directly impact production efficiency.

Observability and Management

Industrial streaming architectures require comprehensive visibility into pipeline health through key performance metrics including event throughput, end-to-end latency, consumer lag, and broker resource utilization. Effective observability encompasses:

  • Real-time monitoring with integrated dashboards and automated alerting

  • Traffic pattern analysis for capacity planning and optimization

  • End-to-end tracing to quickly diagnose bottlenecks or failures

  • Schema monitoring to catch compatibility issues before they impact production

Conclusion

Building an industrial IoT data streaming architecture with MQTT equips manufacturers with the agility, resilience, and scalability needed for modern, connected operations. By combining event-driven architecture with MQTT’s lightweight, publish-subscribe model, manufacturers can create modular systems that are easier to maintain, faster to scale, and capable of delivering real-time insights across the enterprise. As production environments become increasingly complex, this architecture serves as the digital backbone that enables predictive intelligence, seamless IT/OT integration, and smarter decision-making at every level.

Stay tuned to our next blog in the series, Practical Guide to IIoT Data Streaming Implementation in Manufacturing, where we will discuss four key IIoT streaming use cases that represent a maturity journey for digital manufacturing leaders.

Kudzai Manditereza

Kudzai is a tech influencer and electronic engineer based in Germany. As a Sr. Industry Solutions Advocate at HiveMQ, he helps developers and architects adopt MQTT, Unified Namespace (UNS), IIoT solutions, and HiveMQ for their IIoT projects. Kudzai runs a popular YouTube channel focused on IIoT and Smart Manufacturing technologies and he has been recognized as one of the Top 100 global influencers talking about Industry 4.0 online.

  • Kudzai Manditereza on LinkedIn
  • Contact Kudzai Manditereza via e-mail
HiveMQ logo
Review HiveMQ on G2