How To Buy
EN
TR

The number of devices in the IIoT field is increasing rapidly. The free structure of MQTT is flexible, but in large facilities, this freedom can turn into disorder. This is where MQTT Sparkplug B comes in, bringing scalability, reliability, and automatic discovery with its standard topic structure, disciplined payload, and state management. In this article, we clarify two main values: selecting the right topology and rapid deployment with automatic discovery.

Consider a simple example. You install a new temperature sensor on your production line. With Sparkplug B, the sensor publishes a “birth” message, the system instantly discovers it, and you see the data on the SCADA screen within seconds. In the context of 2025, an edge broker placed between the field and the cloud reduces latency, cuts down WAN traffic, and lowers costs. The target audience is OT, IT, automation, and data teams.

The focus keywords are MQTT Sparkplug B, IIoT, edge broker, automatic discovery, state management, payload, topology.


What is Sparkplug B, and What Does It Add to MQTT?

Sparkplug B imposes a structured framework on top of MQTT. It standardizes the topic naming, structures the payload, provides state management with birth and death messages, and defines the command flow. The reason things get easier in large facilities is this clarity: everyone speaks the same language, and data flows consistently.

  • The standard topic structure simplifies subscription and authority management.

  • The structured payload (protobuf) ensures data types, quality, and timestamps are consistent.

  • State management reveals the online, offline, and reconnect states of EoN (End-of-Network) nodes and devices.

  • Automatic discovery completes the chain from the birth message to the subscriber’s catalog update.

In the IIoT field, automatic discovery and consistent naming are the insurance for data integrity. Simply think of the Unified Namespace as a single, accurate data address book. Everything has a place, and every piece of data has a single, correct name. Let’s familiarize ourselves with the terminology: $group\_id$, $EoN\_node$, $device\_id$, $metric\_alias$. Example metrics are fundamental data pieces like temperature, status bit, and timestamp.

If you want to refresh your knowledge of the basics of MQTT, the MQTT broker structure is a good starting point.

Disciplined Data Flow with Standard Topic Structure

The Sparkplug B topic template is: $spBv1.0/<group\_id>/<message\_type>/<edge\_node\_id>/<device\_id>$. Here, $group\_id$ is used for clusters of areas, lines, or facilities. For example, $spBv1.0/factoryA/packaging/line-1/machine-3$.

The $message\_type$ types are the heart of the operation:

  • NBIRTH, NDEATH: EoN node birth and death.

  • DBIRTH, DDEATH: Device birth and death.

  • NDATA, DDATA: Data messages.

  • NCMD, DCMD: Command messages.

This consistent structure reduces the risk of incorrect subscriptions. In large installations, access control is simplified, and it becomes clear which team can access which topic.

Accurate Type, Accurate Time with Structured Payload

The payload is Protobuf-based. Each message carries a list of metrics. Each metric includes data type, quality, alias, sequence number, and timestamp. Carrying multiple measurements in a single message is efficient in terms of bandwidth and latency.

QoS, retain, and store-and-forward work together. QoS sets the delivery guarantee, retain quickly provides the initial state, and store-and-forward stores the message during disconnections. Type safety and the alias structure enable effortless matching with data warehouse and analytics tools.

The term “payload” refers to the entire structured message. The “metric alias” is the numerical short name for the metrics, increasing network efficiency and mapped to a human-readable name on the application side.

Instant Visibility with State Management

Birth and death messages instantly show that nodes are alive or disconnected. The Watchdog mechanism and session state streamline the process upon reconnection. Operational teams use this information to make sense of alarms: the question, “Did the device go silent, or is it planned maintenance?” finds a clear answer. Automatic discovery starts with the birth message, and state management keeps this discovery information continuously updated.

Unified Namespace and the Common Language for IIoT

The Unified Namespace is a real-time data address book. Sparkplug B’s strict topic and payload rules keep this space consistent. The same data does not circulate under different names in different systems. A simple naming policy, e.g., $line-1/packaging/machine-3$, ensures everyone is directed to the same target.


The Right Topology: Edge Broker, Core Broker, and Network Layers

In industrial scale, topology is the determinant. The edge broker provides low latency and resilience in the field. The core broker is the corporate aggregator. A single-tier design may be sufficient for small installations. A two-tier architecture, however, provides confidence in large, multi-site, and cloud-connected fields. OT, DMZ, and IT layers must be clearly separated for security and network zoning. Failover, clustering, and persistence are key components of sustainability.

Single-Tier or Two-Tier?

The single-broker topology is fast and practical for a small cell. Simplicity brings ease of installation and maintenance. In a two-tier architecture, edge brokers collect data locally, can process it, and buffer it if necessary. They then provide the upstream flow to the core broker.

Benefits of two-tier:

  • Low latency: Local decisions are made within milliseconds.

  • Local resilience: Local operation continues when the connection is lost; store-and-forward reduces data loss.

  • WAN bandwidth savings: Aggregated and meaningful flow is carried upstream.

How long should you stick with single-tier? A simple framework: if the number of devices is in the hundreds, the message rate is low, and you are operating in a single location, a single broker may be logical. As geographical spread increases and lines and facilities multiply, the two-tier arrangement pays for itself.

Topology Advantages Disadvantages Usage Recommendation
Single Broker Simplicity, low cost, fast setup Single point of failure, reliance on WAN Small cell, single facility
Two-Tier Low latency, local resilience More components, management need Multi-site, WAN, cloud integration

Edge Broker Placement and Connection Strategies

Position the edge broker close to the machine room, cell panel, or production island. Persistent session, QoS 1, retained messages, and message buffering locally are a good start. Consider CPU, RAM, and disk I/O when planning resources. A local latency target in the low double-digit milliseconds, and tens of milliseconds for WAN, is a practical benchmark.

For IIoT traffic, combine change-of-state publishing, batch transmission windows, and alias usage in data exchange. This combination reduces latency via the edge broker and cuts costs in the upstream flow.

High Availability and Clustering Patterns

There are two main approaches at the core broker layer: active-active or active-passive. Session stickiness increases the stability of sequence-dependent flows by keeping the connection on one node. Shared subscription facilitates consumer scaling. Persistent storage ensures consistency after a restart. Zone-based partitioning limits latency and risks. Use quorum and independent observer designs to prevent split-brain risk. Plan failover tests periodically; don’t leave them only on paper.

Network, Security, and DMZ Arrangement

Clearly separate OT, DMZ, and IT layers. Implement TLS, client certificates, user-role-based authorization, and topic-level access control for secure communication. Open only necessary ports on the firewall. One-way data flow patterns ensure controlled passage from OT to IT. A separate channel for monitoring and log collection speeds up incident review.

Short checklist:

  • Are TLS and mTLS active?

  • Have topic-based authorization rules been tested?

  • Is the broker bridge in the DMZ isolated?

  • Are logs rotated, and is the retention period defined?

  • Have HA and failover scenarios been tested?


Rapid Deployment with Automatic Discovery and State Management

Manual definition is unsustainable in a large installation. Sparkplug B’s automatic discovery works thanks to the structured topic and payload. The birth message carries the device’s identity, metric list, and attributes. Subscribers read this message and update their catalogs automatically. State management clearly flows the offline, online, and reconnect states. As the scale grows, naming, versioning, and template management become critically important.

Naming, Group, and ID: A Solid Foundation

Set simple and persistent rules for selecting $group\_id$, $edge\_node\_id$, and $device\_id$. Combine prefix, region code, line name, and equipment number. Avoid spaces and non-English characters; prefer underscores or hyphens.

Metric alias and the human-readable name should be used together. The alias should be numerical and short, and the human-readable name should be descriptive. Example: alias 1001, name “temperature_out”. This pair speeds up searching in the automatic discovery output and facilitates governance.

Birth, Death, and Rebirth Flows

NBIRTH and DBIRTH present device capabilities and the metric list, including initial values. NDEATH and DDEATH notify of disconnection. These signals are used to generate meaningful alarms during situations like planned maintenance or power outages.

Simple timeline:

  • NBIRTH: EoN node is ready; subscribers update metadata.

  • DBIRTH: Devices and their metrics are published; the catalog is updated.

  • NDATA/DDATA: Regular data flow begins.

  • NDEATH/DDEATH: Disconnection is detected; an alarm is triggered.

  • Reconnection: Synchronization is refreshed with NBIRTH/DBIRTH; the data gap is closed with store-and-forward.

Templates, Versioning, and Change Management

Create metric templates for similar machines. The template should include metric name, alias, type, and unit. Add a template version number and change log. When a new sensor is added, preserve old aliases for backward compatibility, and give new metrics a new alias.

In large installations, a test, phased deployment, and rollback plan is essential. First, a test line, then a single production island, then the entire facility. Documentation can be kept up-to-date by being automatically derived from birth messages. This ensures that the information reflects the reality in the field.

Integration with SCADA, Historian, and Analytics

Clearly define topic filters to connect the Sparkplug B flow to SCADA screens, historian storage, and analytics tools. Data type mapping, such as int, float, boolean, and timestamp usage, must be done correctly. Select simple metrics to measure the latency budget: time from birth to first data, message error rate, buffer fill percentage.

Using a transition bridge is logical for converting old flows coming from raw MQTT. The bridge translates the old topic and payload to Sparkplug B rules. This approach initiates standardization without changing field devices overnight.


Implementation Plan, Checklist, and Common Mistakes

The path to success involves a small pilot, observations, and gradual scaling. There is no improvement without monitoring and visibility. Proceeding with a checklist carries the topic forward without creating technical debt.

From a 2025 perspective, edge computing and Sparkplug B are on the rise together. Analytics and buffering at the edge relieve the WAN and reduce latency. In industrial scale, this partnership brings gains in both performance and cost.

Pilot Installation: 30 Days, Clear Goals

Keep the scope narrow: 1 production island, 1 edge broker, 5-10 devices. Target KPIs:

  • End-to-end latency, $p95$ and $p99$.

  • Data loss rate.

  • Reconnection time.

  • Operator alarm accuracy.

Write down success metrics, e.g., $p95$ latency below 80 ms, data loss less than 0.1%. Keep a daily log, and note down issues and observations. The decision points should be clear at the end of the pilot: scaling, improvement, rollback.

Monitoring and Visibility: You Cannot Improve What You Do Not Measure

Collect broker metrics: number of connections, message rate, pending queue, CPU, RAM, disk I/O. Monitor Sparkplug B events: number of births and deaths, frequency of rebirths. Set alert thresholds, and visualize them.

Simple log scheme:

  • Application and broker logs separate.

  • Log rotation daily.

  • Retention 30-90 days.

  • Summary metrics weekly report.

Link incidents to maintenance work orders. For example, if an EoN node is reborn three times a day, plan a field check.

Transition Strategy and Common Mistakes

Plan a phased transition for old devices using raw MQTT with a bridge or converter. Common mistakes and solutions:

  • Inconsistent naming: Solution: publish a naming standard with examples.

  • Alias confusion: Solution: freeze aliases; only give new aliases to new metrics.

  • Excessively deep topic tree: Solution: aim for 4-5 levels; prune unnecessary branches.

  • Overloading a single broker: Solution: two-tier topology and shared subscription.

  • TLS configuration errors: Solution: mTLS and valid CA, automatically renewing certificates.

  • Unnecessarily high QoS: Solution: QoS 1 is sufficient for most telemetry.

  • Misuse of retain: Solution: retain only for state and last value, not for flow data.

Make changes outside of business hours. The rollback plan should be written and tested.


Conclusion

Sparkplug B matures MQTT for industry and simplifies scalability. Let’s re-emphasize the two main leverage points: the selection of the right topology and automatic discovery with state management. Three small steps to take today:

  1. Write and share your naming standard.

  2. Install a pilot edge broker on a single production island.

  3. Verify the content and continuity of birth messages.

Launch a small pilot in your environment, see the results with numbers, and then grow with confidence. Keep the key concepts in mind: MQTT Sparkplug B, IIoT, edge broker, automatic discovery, state management, payload, topology. A well-designed structure returns low cost and high reliability for many years.

Other Post
All Posts
What is Data Management in PLC and the Advantages of Using Data Management ?
What is Data Management in PLC and the Advantages of Using Data Management ?
In the realm of industrial automation, Programmable Logic Controllers (PLCs) stand out as crucial automatic control devices, frequently employed in industrial sectors. As we emphasized in our blog pos
Read More
What are Industrial Automation Products?
What are Industrial Automation Products?
What are Industrial Automation Products? Industrial automation involves using control systems, computers, and robots to automate an enterprise's production processes; and industrial automation produc
Read More
What are the advantages of meter reading with MDC OSOS Server?
What are the advantages of meter reading with MDC OSOS Server?
MDC OSOS Server: An Innovative Solution for Modern Electricity Meter Data Management Introduction The automated collection and management of electricity consumption data is a critical need in modern
Read More
WIN EURASIA 2023
WIN EURASIA 2023
We left behind the WIN EURASIA 2023 Automation Fair, one of the most important organizations in the region. We presented the new technologies we brought to our products and the new product families we
Read More
IoT Gateway Selection: Features, Performance Criteria, Protocol Support, and Device Capacity
IoT Gateway Selection: Features, Performance Criteria, Protocol Support, and Device Capacity
In industrial or commercial IoT projects, IoT gateways play a crucial role in ensuring accurate and fast data flow between devices. An IoT gateway brings together different protocols, devices, and app
Read More
HOW TO REDUCE MAİNTENANCE COSTS WİTH AGİNG FUNCTİONS İN PLC PROGRAMMİNG ?
HOW TO REDUCE MAİNTENANCE COSTS WİTH AGİNG FUNCTİONS İN PLC PROGRAMMİNG ?
Optimizing Control Systems with PLC, RTU, and SCADA In the ever-evolving world of industrial automation, Programmable Logic Controllers (PLCs) play a crucial role in controlling and monitoring variou
Read More
Arçelik Chooses Mikrodev Products for TV Remote Control Functional Test System
Arçelik Chooses Mikrodev Products for TV Remote Control Functional Test System
Arçelik strengthened its motion control system to enhance the quality of remote controls for televisions by opting for Mikrodev products in the TV remote control functional test system. Utilizing the
Read More
What is the MQTT?
What is the MQTT?
What is the MQTT Communication Protocol? The rapid proliferation of Internet of Things (IoT) and other similar distributed systems has increased the importance of data communication. The requirements
Read More
Benefits of SCADA in Manufacturing
Benefits of SCADA in Manufacturing
In the dynamic landscape of modern manufacturing, efficiency and control are paramount. As industries evolve and technologies advance, staying ahead requires sophisticated solutions that optimize
Read More
Mugla City Water and Sewerage Administration (MUSKI) Water SCADA System
Mugla City Water and Sewerage Administration (MUSKI) Water SCADA System
Drinking water controls of 350 stations throughout Mugla province in Türkiye are made through Mikrodev RTU products and ViewPLUS SCADA software. In the system, well and tank operation/failure conditio
Read More
CATALOG