Consulting
Verticals
Co-operative BankingSEBI and FintechMSM ManufacturingEducation
Technology Stacks
How the chain worksNetwork and infrastructure architectureData traffic engineeringInformation-security data engineeringCybersecurity control architectureGovernanceIndustrial edge and IoT gatewaysIndustrial IoT and asset lifecycle
Compliance
DPDP ActRBI CSFSEBI CSCRFNIST CSF 2.0
Case Studies
For Partners
Insights
ArticlesBulletinTalks and Events
About
The LabFounderRecognitionProfessional projects

Articles / 26 October 2026

One Plant, One Language: MQTT, Sparkplug B and the Unified Namespace

MQTT carries the plant’s data, Sparkplug B gives it meaning, and a Unified Namespace gives every system the same view of it.

MQTT carries the plant’s data, Sparkplug B gives it meaning, and a Unified Namespace gives every system the same view of it.

MQTT carries plant data, Sparkplug B gives each message its meaning and tells subscribers whether the sender is alive, and a Unified Namespace gives every system one organized view of the plant. This article shows how the three work together, from the edge gateway to a secure, well-named data layer, so that every system reads the same plant data.

One transport, one message contract and one shared map: how every system in a plant reads the same data.

One measurement should never need four names.

Follow a single oven temperature through a typical plant. The controller calls it T1. The dashboard shows Temp_Zone_A. The ERP report says Oven 1 Temperature, and the historian keeps it under a tag ID that one engineer remembers. Four systems describe one measurement, and each holds its own name, unit, data type and timestamp habit.

MQTT, Sparkplug B and the Unified Namespace: The Road, the Sign and the Map of Plant Data. The MQTT is the road, Sparkplug B is the road sign, and the Unified Namespace is the map.

Every system then needs a translation to every other system. Five systems can call for up to ten separate links, and ten systems up to forty-five. Each link carries its own mapping, its own testing and its own maintenance, and one change on one side ripples through the rest. Point-to-point integration grows like a spider web, and a spider web is a delicate thing to maintain.

Point-to-point integration grows like a spider web, and a spider web is a delicate thing to maintain.

Industrial data engineering offers a cleaner path. Agree on one transport, one message contract and one organised home for the data, and the web becomes a hub. MQTT, Sparkplug B and a Unified Namespace do this work together, each solving a different part of the problem. MQTT is the road, Sparkplug B is the road sign, and the Unified Namespace is the map. Let us walk through them in order.

Three layers, three jobs. MQTT carries the message, Sparkplug B describes it and its sender, and the Unified Namespace gives it a permanent address in the plant. When each layer does only its own job, every layer stays simple.

Starting with the Road

MQTT, short for Message Queuing Telemetry Transport, was built for small devices and unreliable networks, which suits a plant floor well. Its core idea is publish and subscribe through a broker. A device publishes a message to a topic, the broker receives it, and every client subscribed to that topic gets a copy. Publishers and subscribers never need to know about each other, so a new consumer simply subscribes and the publisher stays untouched. Connect once to the broker, and every system hears the plant.

A protocol designed for patchy links feels at home on a factory floor. Connect once to the broker, and every system hears the plant.

A topic is a hierarchical string whose levels are separated by a slash, such as plant1, then press, then line2, then machine4, then temperature. Subscribers can use two wildcards. The plus sign matches exactly one level, so a subscription to the machine4 temperature on every line takes one line of configuration. The hash sign matches everything below a point, so a single subscription can listen to all of line2. Wildcards turn a naming hierarchy into a query language.

Every message also chooses its delivery guarantee through Quality of Service. Level zero delivers at most once and suits frequent telemetry, where the next value replaces a lost one. Level one delivers at least once, with an acknowledgement, and suits events and alarms where every message matters. Level two delivers exactly once through a four-step handshake and suits commands, where a duplicate could cause harm. The right level is the one that matches the cost of losing or repeating that message.

Wildcards turn a naming hierarchy into a query language. The right level is the one that matches the cost of losing or repeating that message.

Three more features make MQTT especially friendly to industrial work. A retained message is the last message the broker keeps on a topic and hands to every new subscriber the moment it arrives, which makes it the plant’s memory: the latest truth is waiting for every newcomer. A Last Will and Testament is a message the client registers when it connects, and the broker publishes it if the client drops unexpectedly, so a silent failure becomes a visible signal. A persistent session lets the broker keep subscriptions and queued messages while a client is away and deliver them on its return, so a short outage becomes a short pause.

A retained message is the plant’s memory: the latest truth is waiting for every newcomer.

On the security side, production brokers listen on TLS, usually on port 8883, and recognise each device through its own X.509 certificate in a mutual TLS handshake. Topic access control lists then state which client may publish or subscribe to which branch. Identity and permission stay in the broker, and the data flows within clear boundaries.

A silent failure becomes a visible signal. A short outage becomes a short pause. Identity and permission stay in the broker, and the data flows within clear boundaries.

A practical way to choose the delivery level is to ask what a lost or repeated message would cost. Frequent readings usually travel well at level zero, alarms at level one, and commands at level two.

Why the Road Benefits from a Road Sign

MQTT leaves two things open on purpose: the topic layout and the payload format. A payload is simply bytes. One team may send the bare number 72.5, another a small JSON object, and a third a line of comma-separated text. Units, data types, timestamps and quality flags then live in private agreements between each publisher and subscriber.

Without a contract, every payload needs its own decoder, and every decoder needs its own owner.

That freedom is a strength for general messaging. For a plant with many machines, vendors and systems, a shared contract adds clarity. Without a contract, every payload needs its own decoder, and every decoder needs its own owner. Sparkplug B supplies the contract.

Sparkplug B: Describing the Data and Its Sender

Sparkplug is an open specification from the Eclipse Foundation. It sits on top of MQTT and defines three things: a topic namespace, a payload format and a model for managing state.

The topic namespace has a fixed shape. A Sparkplug topic starts with the namespace and version, spBv1.0, then names a group, then a message type, then an edge node and, optionally, a device. The group is usually a site or an area, the edge node is the gateway that connects to the broker, and the device is a machine behind that gateway. Because every publisher follows the same shape, every subscriber knows where to look.

When every publisher follows the same shape, every subscriber knows where to look. A self-describing value arrives with its meaning attached.

The payload uses Google Protocol Buffers, a compact binary encoding that keeps messages small on constrained links. A payload carries a timestamp, a sequence counter and a list of metrics. Each metric holds a name, a data type, its own timestamp and its value, plus optional properties such as the engineering unit and a quality indicator. After the first announcement, a metric can be referred to by a short numeric alias in place of its long name, which saves bandwidth on every later message. The result is a self-describing value: it arrives with its meaning attached.

The most distinctive part of Sparkplug B is state management, and it works like a civil registry for the plant. When an edge node connects, it registers its own death certificate with the broker as the MQTT will, and then publishes a birth certificate, called NBIRTH, listing every metric it owns with name, type and current value. Each device behind it announces itself the same way with a DBIRTH message. From then on, the node reports only what changes, in NDATA and DDATA messages, which is report by exception: the plant speaks when something changes, and the data stays lean. If a device goes offline, a DDEATH message says so, and if the whole node drops, the broker publishes the registered NDEATH. Host applications can send commands back with NCMD and DCMD messages, and the primary host application publishes its own STATE message so that edge nodes can see whether their audience is present.

Report by exception: the plant speaks when something changes, and the data stays lean. Birth certificates and death certificates turn a message stream into a living inventory of the plant.

Birth certificates and death certificates turn a message stream into a living inventory of the plant. At any moment, a subscriber knows which devices exist, which metrics they carry and whether the data is current.

A missing message becomes a short conversation, and the picture is whole again.

Two counters keep that inventory honest. The sequence counter, which runs from zero to 255 and rises with every payload from an edge node, lets a host spot a gap the moment a message goes missing. The birth and death sequence number, called bdSeq, travels in both the birth message and the death message, so a host can match each death to the correct birth, and a stale death message from an old session never marks a healthy node as offline. When a host wants a fresh picture, it sends a rebirth request, and the node republishes its births with all current values. A missing message becomes a short conversation, and the picture is whole again.

Sparkplug specifies delivery level zero for most data messages and relies on sequence-gap detection plus rebirth for recovery. We recommend following the specification, and placing the reliability effort in a clustered, persistent broker and in a store-and-forward buffer at the edge node.

The Map: A Unified Namespace

A Unified Namespace is an architecture pattern. It places the current state of the whole business in one organised hierarchy, with every system publishing into it and reading from it. The picture to hold in mind is hub and spoke: the broker sits in the middle, and the PLC data, the sensors, the gateways, the MES, the ERP, the historian, the dashboards and the analytics each connect to it once. Where point-to-point integration grows with every pair of systems, the namespace grows with every system, in a straight line.

Where point-to-point integration grows with every pair of systems, the namespace grows with every system, in a straight line.

The hierarchy usually follows the ISA-95 equipment model, from enterprise to site, area, line and cell. A branch of the tree might read acme, then pune, then pressshop, then line2, then machine4, and under machine4 sit the temperature, the running state and the part count. A topic then works as an address, and a name that carries its own address saves a translation in every system downstream.

A name that carries its own address saves a translation in every system downstream. One namespace, one truth, many readers.

A healthy namespace shows four properties. It is a single source of truth, with one name and one value for each measurement. It is event-driven, because values publish when they change and consumers receive fresh data without polling. It holds the current state through retained messages, so a new subscriber learns the latest value of every topic as soon as it connects. And it welcomes growth: a new consumer subscribes, a new source publishes into a new branch, and the existing systems carry on undisturbed.

Design the hierarchy before you connect the devices, and the structure supports everything that follows.

Order matters here. Design the hierarchy before you connect the devices, and the structure supports everything that follows.

Plants that connect devices first and design the hierarchy afterwards tend to rebuild their old fragmentation on top of a broker. A short design session to fix the levels, the names and the owners before the first publish is the most valuable hour in the whole project.

Naming Is Where It All Pays Off

A Unified Namespace is only as good as its names, so a little discipline goes a long way. Names read best from broad to specific, following the business hierarchy. Lowercase letters, digits and one consistent separator keep wildcards and access rules simple. A name states the measurement, and the unit travels as metadata, so a topic ending in temperature carries degrees Celsius as a property. Names stay stable, and the model that defines them is versioned in source control. Every branch has one owner, so that the line engineer maintains line2 and the conversation about any change has a clear first stop.

Good names are the cheapest integration a plant will ever buy. A model written once serves every machine that follows.

The most useful tool is a published information model, a document that lists each asset type and the metrics it must carry. A press, an oven and a conveyor each receive a template, and every new machine of that type follows it. Predictability is what lets a new subscriber start working on day one. A model written once serves every machine that follows.

How Road, Sign and Map Work Together

MQTT answers how the message travels. Sparkplug B answers what the message contains and whether its sender is alive. The Unified Namespace answers where the data lives and what it is called. Each layer does one job well, and the combination gives a plant a data foundation that every system can trust.

Each layer does one job well, and the combination gives a plant a data foundation that every system can trust.

One detail deserves a deliberate choice. Sparkplug B’s topic shape of group, edge node and device is flatter than a deep ISA-95 hierarchy, so plants usually settle on one of two patterns.

In the first pattern, Sparkplug B sits at the edge and a plainly named namespace sits above it. Edge nodes publish Sparkplug B to a Sparkplug-aware host layer, a bridge decodes the payloads, applies the information model and republishes each metric into the full ISA-95 hierarchy with readable payloads such as JSON. Consumers enjoy the complete tree and subscribe with any ordinary MQTT client, while Sparkplug B keeps its strengths where devices connect: birth and death state, typed metrics and aliases.

The edge speaks Sparkplug, and the enterprise reads plain language.

In the second pattern, Sparkplug B runs throughout. The group carries the site or area, the edge node carries the line or the gateway, and the device carries the machine. Consumers are Sparkplug-aware applications, and the architecture stays compact.

When many kinds of consumers are expected, such as ERP, BI tools and custom applications, the first pattern usually pays off, because the plain hierarchy lets any MQTT client subscribe without a Sparkplug decoder. When the consumers are SCADA and IIoT platforms with native Sparkplug support, the second pattern is the shorter path.

The Edge Gateway: Where Quality Is Born

Data begins its life at the edge gateway, so the gateway’s role deserves a close look. Quality is born at the edge, and it travels with every byte.

Quality is born at the edge, and it travels with every byte.

A well-built gateway connects to machines through isolated 4-20 mA and 0-10 V inputs, digital contacts, RS-232 and RS-485 serial lines, Modbus RTU and TCP, and protocols such as OPC UA and MTConnect. It reads each device on a defined cycle, with timeouts and retries per device. Next it scales and normalises the raw value, so that a register reading of 18240 becomes 182.4 degrees Celsius, with a quality flag attached. Then it names the value from the information model and wraps it as a Sparkplug B metric, or as a plain JSON payload for the namespace above.

A raw number becomes information the moment it gains a unit, a name and a timestamp. An outage then costs the plant a delay and leaves the record intact.

Publishing follows the same care. The gateway reports by exception, sending a value when it changes beyond a configured deadband, with a slow heartbeat in between that confirms the device is alive and keeps traffic lean. The connection runs over TLS with the gateway’s own certificate, and the death certificate is registered at connect. During a network or broker outage, store-and-forward buffering writes values to local storage with their original timestamps, and sends them in order on reconnect, so the history arrives complete and in sequence. An outage then costs the plant a delay and leaves the record intact.

Scaling, naming and timestamping at the gateway decide the quality of every report, dashboard and model that reads the data later. A few extra minutes spent on these three steps for each device repay themselves across every system downstream.

Security and Zoning

An industrial data layer works best inside a clear security architecture. Devices and gateways sit in the lower levels of the Purdue model, the broker sits in its own well-defined zone, and enterprise consumers reach the data through an industrial DMZ at Level 3.5. IEC 62443 conduits carry only the required MQTT traffic between zones, so each boundary has a purpose that can be stated in one sentence.

Each boundary has a purpose that can be stated in one sentence. Every device earns its own identity, and every identity earns only the access it needs.

Identity comes first. Each gateway holds its own certificate, issued and revoked through a managed PKI, and the broker verifies who connects through mutual TLS on TLS 1.2 or higher. Permission follows identity: access control lists narrow each client to the branches it needs, so a gateway publishes only into its own line and a consumer subscribes only to the areas it serves. A shared username and password is quick to start and hard to govern, while per-device certificates and per-branch permissions give every publisher a narrow, auditable role from the first day.

Data may travel freely upward, while commands travel only with credentials and a record.

The return path for commands joins the design with equal care. Many plants begin with data flowing from the field to the enterprise, and add commands once authentication, bounds checking, verification and audit logging are in place, while safety functions remain on hardwired circuits. Broker logs and connection events flow to the SIEM, and birth and death events become useful health signals. The broker itself runs as a cluster with persistence, and message rates, queue depth and connected clients appear on a monitoring dashboard, so the data layer is observed as closely as the machines it describes.

Closing Thoughts

Industrial data engineering rewards early structure. A plant that settles its names, its message contract and its namespace at the start gains a data layer that grows by adding publishers and subscribers, and each new system makes the whole more valuable.

Common naming lets every system speak the same words, Sparkplug B lets every message carry its own meaning, and the Unified Namespace gives every reader the same plant.

We hope this walkthrough gives engineers and decision-makers a clear map for that journey.

MQTT carries the message, Sparkplug B defines what it means and whether its sender is alive, and the Unified Namespace gives the whole plant one shared, organised view. Together they turn many separate systems into one coherent flow of plant data.

Consulting · first engagements

Start with a small engagement.

Start small, prove it, then scale. Six first engagements, each with a plain question and a written plan.

Book an assessment