Protocols

How MQTT Is Used in Industrial IoT

MQTT is widely used in Industrial IoT because it provides a simple publish-subscribe pattern for moving data from machines to applications. Instead of every dashboard, MES connector or analytics service polling a controller directly, an edge component publishes messages to a broker. Consumers subscribe to the topics they need. In an MQTT industrial IoT architecture, that separation is often the difference between a maintainable data layer and a fragile set of point-to-point integrations.

The basic MQTT pattern

MQTT has three primary roles: publishers, brokers and subscribers. A publisher sends messages to named topics. The broker receives those messages and routes them to any subscriber with a matching subscription. The publisher does not need to know how many subscribers exist, where they run or what they will do with the data.

That pattern fits manufacturing data flows well. A machine gateway can publish machine state, part count, alarm and process value messages. A dashboard can subscribe to live state topics, an MES integration can subscribe to production events, and an analytics pipeline can subscribe to high-frequency process values when appropriate. Each application consumes the same stream without adding load to the controller.

Why MQTT is useful on the shop floor

Industrial networks include equipment with different lifecycles, protocols and ownership boundaries. MQTT does not replace deterministic control networks and it should not be used for safety or real-time motion control. Its value is in distributing operational data from the edge to software systems in a predictable, decoupled way.

  • Publish-subscribe routing reduces direct dependencies between machines and consuming applications.
  • Topic structures provide a clear hierarchy for site, area, line, machine and signal names.
  • Message payloads can carry current values, events, timestamps, quality and units.
  • Brokers support multiple subscribers without requiring every subscriber to connect to industrial controllers.
  • Edge gateways can buffer or republish data depending on the selected broker and application design.

Topic design for manufacturing data

Topic naming should be treated as an engineering standard, not an afterthought. A topic such as plant1/line2/cellA/mill07/state is more useful than a flat tag name because subscribers can filter by plant, line, cell or signal. Teams should decide whether topics represent assets, signals, event types or a combination of those dimensions.

Avoid putting every possible context field into the topic. If part number, work order, operation, program and operator are dynamic, those values usually belong in the payload. Topics should remain stable enough for subscriptions and access rules. Payloads should hold the changing business context and measurement details.

Payload structure and data quality

MQTT does not define the payload format. Manufacturers commonly use JSON, structured binary formats or application-specific schemas. Whatever format is selected, the payload should include more than just value. A useful machine data payload includes source, timestamp, quality, unit of measure and value type. Without those fields, downstream systems may misinterpret stale or invalid data.

For events such as cycle complete or alarm active, include an event timestamp from the source or gateway, not only the time the subscriber received the message. For sampled process values, define update rate and change criteria. Publishing every noisy analog change may waste broker capacity; publishing too slowly may hide important process behavior.

MQTT and industrial protocols

Most machines do not speak MQTT natively. CNC machines, PLCs and controllers may expose data through OPC UA, MTConnect, controller APIs or PLC protocols. An edge connectivity layer reads those sources, normalizes values and publishes MQTT messages. This is where an industrial IoT gateway or software connectivity platform becomes important.

The same plant may publish MQTT for modern applications while also serving OPC UA to SCADA or MTConnect to CNC-focused systems. The goal is not to choose one protocol for every case. The goal is to create a consistent machine data layer that can serve each application through the interface it expects.

QoS, retained messages and sessions

MQTT quality of service settings control delivery behavior between a client and broker. QoS 0 is lightweight but does not guarantee delivery. QoS 1 confirms that a message is delivered at least once, which means consumers must handle duplicates. QoS 2 adds a stricter handshake but can increase overhead. Manufacturing teams should choose settings based on the importance and frequency of each data type.

Retained messages can be useful for current state topics because a new subscriber receives the latest value immediately. They are less appropriate for event streams such as cycle complete unless the consumer clearly understands retention behavior. Session settings, keepalive intervals and last will messages should be configured so consumers can detect when an edge publisher is offline rather than assuming a machine is idle.

Security and network placement

MQTT projects should be designed with network boundaries in mind. Brokers may run on-premises, in a demilitarized zone, or in a cloud environment depending on the plant architecture. Authentication, authorization and encrypted transport are common requirements, but the exact controls depend on site policy. Do not expose controller networks directly to broad application access.

A practical pattern is to keep controller access at the edge and publish only the required operational data outward. That reduces the number of systems with direct machine connectivity and gives IT teams a clearer point for monitoring, firewall rules and certificate management.

Where SmartConnect IIoT fits

SmartConnect IIoT connects CNC machines, PLCs and industrial controllers, collects data and publishes it through MQTT as well as OPC UA and MTConnect. The MQTT gateway capability is part of the connectivity layer between machines and applications, not a replacement for MES, SCADA or analytics software.

If you are planning an MQTT pilot, define topics, payloads and consumer requirements before connecting every asset. Review the resources section for related connectivity topics, or download the trial to evaluate machine data publishing in a controlled test cell.