V5 Ultimate
Ultimate
PricingResourcesCompany
Start free trial
HomeGlossaryMQTT Sparkplug
Systems & integration · The complete guide

MQTT SparkplugMessage Queuing Telemetry Transport Sparkplug

In short

MQTT Sparkplug standardizes how OT signals are published, discovered, and kept stateful over MQTT, fitting cleanly between ISA‑95 Levels 0–2 and Level 3 MES. In GxP plants, its use must be wrapped with Part 11/Annex 11 controls, ICS cybersecurity (NIST SP 800‑82), and GAMP 5 validation.

Read the full summary

V5 Ultimate consumes Sparkplug at the execution layer, binding time‑stamped metrics to batches, deviations, and releases so the single manufacturing record remains complete and reviewable.

3,500 words · ~16 min read
On this page
  1. 01What it is
  2. 02Where it fits in ISA-95 architectures
  3. 03Payloads, topics, and state management
  4. 04GMP data integrity implications (Part 11/Annex 11)
  5. 05Security architecture and broker hardening (NIST SP 800-82)
  6. 06QoS, retained messages, and store-and-forward
  7. 07Aligning Sparkplug data with ISA-88 batches and equipment phases
  8. 08Validation and lifecycle management (GAMP 5, 2nd ed.)
  9. 09Common pitfalls and how to avoid them
  10. 10Governance, KPIs, and performance engineering
  11. 11How V5 handles MQTT Sparkplug in regulated operations
On this page · 11 sections
  1. 1What it is
  2. 2Where it fits in ISA-95 architectures
  3. 3Payloads, topics, and state management
  4. 4GMP data integrity implications (Part 11/Annex 11)
  5. 5Security architecture and broker hardening (NIST SP 800-82)
  6. 6QoS, retained messages, and store-and-forward
  7. 7Aligning Sparkplug data with ISA-88 batches and equipment phases
  8. 8Validation and lifecycle management (GAMP 5, 2nd ed.)
  9. 9Common pitfalls and how to avoid them
  10. 10Governance, KPIs, and performance engineering
  11. 11How V5 handles MQTT Sparkplug in regulated operations
AI · Explain it for MY operation

How does MQTT Sparkplug apply to your shop floor?

Pick your industry and scale — Ask V5 rewrites the definition in your context, gives a worked example, and shows what V5 does on day one.

Your scale

01What it is

MQTT Sparkplug is an open, vendor-neutral specification that adds a stateful data model on top of MQTT for industrial interoperability. It defines a canonical topic namespace for Assets (Nodes and Devices), typed metric payloads (Protocol Buffers), and lifecycle semantics (birth/death, primary app) so consuming systems can discover equipment, understand data types, and track state without bespoke adapters. Sparkplug’s retained birth messages provide current state to late-joining subscribers, and its sequence counters/timestamps help detect missing or out-of-order telemetry.

  • Stateful discovery: NBIRTH/DBIRTH announce Nodes/Devices; NDEATH/DDEATH signal loss of state.
  • Standardized topics: spBv1.0/<group_id>/<message_type>/<edge_node>/<device>.
  • Typed, timestamped metrics: strong data typing with per-metric timestamps and properties.
  • QoS and retained messages: resilience across unreliable links; late subscriber bootstrapping.
  • Primary application: single source of truth to prevent conflicting command/control.
Context in ISA-95

Sparkplug typically bridges ISA‑95 Levels 0–2 assets to Level 3 applications (MES/ historians), often via a broker in a Level 2.5 DMZ.

02Where it fits in ISA-95 architectures

Sparkplug operationalizes the ISA‑95 integration layers by establishing a consistent, OT-friendly publish/subscribe fabric between sensors/PLCs (Levels 0–2) and MES/quality/scheduling functions (Level 3). In practice, a hardened MQTT broker resides in a plant DMZ, while Sparkplug gateways translate PLC/SCADA tags into metrics. MES subscribes to relevant topics and correlates metrics with orders, batches, and operator actions. This decouples producers and consumers, reduces point-to-point interfaces, and supports multi-line, multi-plant scaling.

ISA‑95 LevelTypical Sparkplug Role
Level 0–1 (Sensors/Actuators)Raw signals aggregated by PLC/edge gateway; not Sparkplug-native.
Level 2 (Control/SCADA)Gateway publishes Sparkplug metrics (alarms, setpoints, status) and handles device birth/death.
Level 2.5 (DMZ/Broker)MQTT broker enforces TLS, ACLs, retained messages; topic namespace governance.
Level 3 (MES/LIMS/CMMS)MES subscribes to NBIRTH/DBIRTH/metrics; binds data to batches, lots, work orders.
Level 4 (ERP)Selective subscriptions for OEE, throughput, and KPI aggregation.
Alarm streams

If Sparkplug transports alarms, align semantics with ISA‑18 alarm rationalization so MES consumers correctly interpret severity, state, and shelving.

03Payloads, topics, and state management

Sparkplug packages metrics with names, data types, timestamps, status flags, and optional properties using a compact binary format. Producers publish NBIRTH (Node) and DBIRTH (Device) messages with the full metric set and retained flag to establish a recoverable state snapshot. Subsequent NDATA/DDATA messages carry changes or periodic updates. If connectivity or power is lost, NDEATH/DDEATH notify subscribers that the cached state is invalid, preventing MES from silently assuming stale values.

  • Topic schema: spBv1.0/<group_id>/<msg_type>/<edge_node>/<device> enables multi-plant scoping.
  • Retained NBIRTH/DBIRTH: late subscribers immediately receive last-known-good configuration and state.
  • Sequence counters and per-metric timestamps aid gap detection and de-duplication.
  • Primary application heartbeat prevents conflicting command/control paths.
Namespace governance

Treat <group_id>, <edge_node>, and metric names as controlled master data. Uncoordinated naming causes topic collisions and misrouted subscriptions in multi-line plants.

04GMP data integrity implications (Part 11/Annex 11)

Sparkplug is a transport/interoperability layer—not a records repository. Nevertheless, its configuration materially affects completeness, accuracy, and contemporaneity of the GxP records produced by MES. To satisfy 21 CFR Part 11 and EU Annex 11 principles, ensure: time-synchronized, attributable metric capture; loss-tolerant delivery (QoS, retained, store/forward); and unambiguous reconstruction of data lineage. MES must provide audit trails, versioning of tag-to-record mappings, and secure retention of the resulting electronic records.

  • ALCOA+ by design: per-metric timestamps from trusted time sources; record-side audit trail of transformations.
  • Attribution: map Node/Device/metric IDs to qualified equipment assets and calibration states.
  • Completeness: edge buffering with replay to prevent gaps; MES-side gap detection and alerts.
  • Contemporaneous: bounded end-to-end latency; document any batching/aggregation windows.
Scope boundary

Part 11/Annex 11 controls (access, audit trail, e-signature) live in MES/QMS. Sparkplug settings must support those controls by preserving trustworthy source data with traceable context.

05Security architecture and broker hardening (NIST SP 800-82)

Because MQTT is lightweight and broker-centric, the broker becomes a critical control point. Apply ICS security patterns from NIST SP 800‑82: segment OT and IT zones, place brokers in a DMZ, and enforce defense-in-depth. Use TLS 1.2/1.3 with X.509 mutual authentication, constrained client certificates, and topic-level ACLs. Disable anonymous access, restrict wildcard subscriptions, and implement certificate lifecycle controls (issuance, rotation, revocation). Monitor with SIEM, rate-limit clients, and isolate high-criticality topics (e.g., recipe parameters) from generic telemetry.

  • Network zoning: Level 2 broker in DMZ with unidirectional rules to Level 3 subscribers.
  • Identity and access: per-asset client IDs; certificate-based auth; least-privilege ACLs.
  • Resilience: clustered brokers with shared retained state; persistence tuned to avoid data loss.
  • Monitoring: audit broker connects/disconnects, topic access, and retained changes.
Primary application contention

Enforce a single primary application for command/control topics. Multiple primaries risk conflicting writes to equipment setpoints.

06QoS, retained messages, and store-and-forward

QoS selection and buffering policies drive the reliability profile of Sparkplug-based integrations. QoS 0 minimizes latency but tolerates loss—unsuitable for critical batch parameters. QoS 1 (at-least-once) is a practical default when MES de-duplicates by sequence or timestamp. QoS 2 (exactly-once) reduces ambiguity but adds overhead and broker state. Combine retained NBIRTH/DBIRTH with edge store-and-forward to ensure that a temporary outage does not create irrecoverable gaps in GxP-relevant telemetry.

  • Choose QoS per signal class: command/control and critical CCP/CPPs often QoS 1 or 2; ambient telemetry may use QoS 0.
  • Implement idempotent consumers to tolerate duplicates (common under QoS 1).
  • Bound replay windows and clearly document late-arriving data handling in SOPs.
  • Retained messages speed recovery but require scrubbing on decommission to avoid stale state.
Operational qualification focus

Stress-test disconnections, broker failover, and edge replays. Demonstrate no data loss or mis-sequencing beyond defined tolerances for regulated signals.

07Aligning Sparkplug data with ISA-88 batches and equipment phases

MES must bind time-series metrics to batch context (master recipe, unit procedure, operation, phase) to create complete, reviewable records. Use equipment-generated phase transition signals (Start/Complete/Hold/Abort) as anchors, captured via Sparkplug, to open and close event frames. For continuous streams (e.g., temperatures, pressures), associate samples with the active phase interval and compute derived values (min/max/mean) under change-controlled algorithms. Preserve the source timestamps and any re-sampling/aggregation logic in the audit trail.

  • Govern metric-to-phase mappings with versioned configuration under change control.
  • Capture setpoint changes as discrete, attributable events alongside continuous telemetry.
  • Synchronize clocks across PLCs, gateways, brokers, and MES to avoid phase boundary ambiguity.
  • For parallel units, include unit identifiers in topics and validate no cross-unit contamination of data.
Alarm rationalization

If alarms are transported via Sparkplug, map them to batch context and ISA‑18 states (active, acknowledged, returned-to-normal) to support deviation triggering and review.

08Validation and lifecycle management (GAMP 5, 2nd ed.)

Treat Sparkplug-based integrations as a composite GxP computerized system. Categorize components: the MQTT broker as Infrastructure Software (GAMP Category 1); commercial Sparkplug gateways/connectors as Configured Products (Category 4); custom scripts/transforms as Custom (Category 5). Perform supplier assessments, define intended use, conduct risk-based testing (installation, operational, and performance checks), and maintain configuration item lists for topics, ACLs, QoS, and retention policies. Changes to metric mappings, topic namespaces, or security settings should follow formal change control with impact assessment and regression testing.

  • Traceability: URS → Risk Assessment → Test cases → Results, covering loss/replay, duplicates, and clock drift.
  • Configuration management: baseline topic schemas, ACLs, and broker persistence; track via version control.
  • Records management: demonstrate that MES produces accurate, complete copies with audit trails (Part 11/Annex 11).
  • Periodic review: verify certificate expiry, ACL currency, retained state hygiene, and time sync health.
Defining intended use

Explicitly state which Sparkplug signals are GxP-significant (e.g., CPPs, CCPs) and which are informational, then scale testing and controls accordingly.

09Common pitfalls and how to avoid them

  • Stale retained state: Decommissioning a device without clearing retained birth messages can resurrect invalid state for new subscribers.
  • Time drift: Unsynchronized PLC/gateway clocks create phase-boundary confusion; enforce NTP with monitoring.
  • QoS mismatch: Using QoS 0 for critical parameters leads to silent loss; establish a signal classification matrix.
  • Wildcard overreach: Broad subscriptions leak unrelated data to MES, inflating storage and review burden.
  • Namespace sprawl: Inconsistent metric naming thwarts cross-line analytics and validation reuse; centralize governance.
  • Replay storms: Unbounded edge replays after outages overwhelm brokers and MES; cap buffers and throttle re-ingest.
  • Primary app split-brain: Multiple primaries seen by an edge node can cause conflicting writes; enforce uniqueness and health checks.
Hidden data transformations

Uncontrolled gateway-side scaling, filtering, or dead-banding compromises data integrity. Document, version, and validate all transforms that touch GxP signals.

10Governance, KPIs, and performance engineering

Establish a governance board spanning OT, IT, QA, and MES to own the Sparkplug namespace, signal catalog, and security posture. Define performance SLOs: end-to-end latency targets for critical metrics, acceptable packet loss rates, broker failover RTO/RPO, and maximum duplicate rates under QoS 1. Use ISO 22400-aligned KPIs (e.g., availability, performance, quality contributing to OEE) as guidance for topic partitioning and subscriber design so KPI computations remain transparent and reproducible.

  • Metric catalog: data type, units, calibration source, sampling rate, criticality class, retention period.
  • Throughput planning: size broker persistence and disk IOPS for retained sets and replay workloads.
  • Backpressure: apply rate limits and drop policies for non-GxP telemetry during incidents.
  • Observability: collect broker and gateway metrics (connects, inflight counts, retained set size, ACL denials).

"Defense-in-depth and rigorous configuration management are essential when deploying lightweight protocols in critical ICS environments."

— NIST SP 800-82 (Interpretive Summary)

11How V5 handles MQTT Sparkplug in regulated operations

V5 Ultimate subscribes to governed Sparkplug namespaces and binds metrics, alarms, and equipment states to batches, lots, and work orders at execution time. Edge buffering and broker-side retained state protect data completeness; MES-side de‑duplication and gap detection ensure accuracy. Configurations (topic schemas, mappings, criticality classes) are versioned under change control, and all transformations are audit-trailed. Data is time-aligned to unit procedures and phases so eBMR/eDHR, deviations, test results, and maintenance events share one authoritative record.

V5 Ultimate — single record, assured integrity

V5 ingests Sparkplug with TLS mutual auth, classifies signals (QoS, replay), and attaches metrics to the batch execution timeline. The same record drives QMS workflows (deviations/CAPA), LIMS results, WMS movements, and Maintenance logs, satisfying data integrity expectations from capture through release.

Frequently asked questions

Q.Does using Sparkplug by itself make a system Part 11 compliant?+

No. Sparkplug is a transport and data model. Part 11 compliance concerns the electronic records application (e.g., MES): access controls, audit trails, e-signatures, and record retention. Sparkplug must be configured to preserve accurate, complete, attributable source data so the MES can generate compliant records.

Q.What QoS should be used for critical process parameters (CPPs)?+

Typically QoS 1 (at-least-once) with idempotent consumption and de-duplication, or QoS 2 if overhead is acceptable. Combine with retained NBIRTH/DBIRTH and edge store-and-forward to avoid gaps. Validate end-to-end latency, duplicate handling, and recovery behavior.

Q.How do we secure an MQTT broker in a plant network?+

Place the broker in a DMZ between OT and IT, enforce TLS 1.2/1.3 with mutual X.509 authentication, apply least-privilege topic ACLs, disable anonymous access and unrestricted wildcards, and monitor connects/denials. Follow NIST SP 800-82 guidance on zoning, segmentation, and defense-in-depth.

Q.How are Sparkplug metrics aligned to batches and phases?+

Capture equipment phase transitions and contextual signals via Sparkplug and create event frames in MES that bound the active intervals. Associate continuous metrics to these intervals, store source timestamps, and audit any aggregations or calculations applied to support review and release.

Q.What GAMP 5 category applies to MQTT/Sparkplug components?+

The broker is typically Infrastructure Software (Category 1). Commercial Sparkplug gateways/connectors are Configured Products (Category 4). Any custom scripts or transforms are Custom (Category 5). Validate based on intended use and risk, with configuration under change control.

Primary sources

  • ISA-95 Overview
  • ISA-88 Standards Committee
  • ISA-18 Alarm Management Standards Committee
  • NIST SP 800-82 Rev. 2: Guide to Industrial Control Systems (ICS) Security
  • ISPE GAMP 5, 2nd Edition
  • FDA 21 CFR Part 11 (eCFR)
  • FDA Guidance: Part 11, Scope and Application
  • EudraLex Volume 4 (Annex 11 Computerised Systems)

Further reading

  • ISA-95
    Enterprise-to-control integration model framing where Sparkplug lives.
  • ISA-88
    Batch models to align Sparkplug signals with phases and unit procedures.
  • MES–SCADA Integration
    Design patterns for bridging SCADA/OT data into MES.
  • MES–PLC Tag Mapping
    Governance for naming, typing, and versioning equipment tags.
  • Machine Data Acquisition
    Capturing signals and context for regulated records and analytics.
  • Edge Buffering / Store-and-Forward
    Resilience mechanisms critical for GxP data completeness.
Software that covers MQTT Sparkplug
V5 Ultimate Quality Control Software
In-process checks, sampling plans, spec limits, SPC trending, CoA generation and hold/release — enforced at the kiosk while the…
V5 Ultimate (21 CFR Part 11)
V5 Ultimate gives FDA-regulated manufacturers bound e-signatures, an audit trail, authority checks and printed-copy controls. An…
V5 Ultimate MES Software
V5 takes planned work orders to a kiosk at the line. Operators follow the configured steps, record weights and checks, and sign.…
V5 Ultimate Manufacturing Execution System
Work orders, electronic batch records, OEE, deviations and calibration on the same platform as your quality records, with ERP…
Talk to us about MQTT Sparkplug

Want to see how MQTT Sparkplug could fit into your own records and workflows? Explore the related V5 pages or talk to our team about what applies to your operation.

Start free
Back to glossary
Where this term comes up
PharmaceuticalMedical DevicesFood ProcessingCosmeticsChemicals
Inside V5
  • → eBMR / eDHR — the batch record fills in as the work is done.
  • → 21 CFR Part 11 — signatures and audit history your team can validate.
Regulatory anchors
  • ISA-95
  • NIST SP 800-82
  • 21 CFR Part 11
  • EU GMP Annex 11
Related terms
  • → ISA-88
  • → MES and SCADA Integration
  • → MES PLC Tag Mapping
  • → Machine Data Acquisition
  • → Edge Buffering, Store-and-Forward
  • → Data integrity

Next step

Try V5 with your own records, or ask a question first. Ask V5 opens with an editable question; nothing is sent until you choose to.

Start your free trial Browse all features
V5 Ultimate
Ultimate

Warehouse, quality and manufacturing software for regulated operations.

ProductIndustriesPricingResourcesSecurity & TrustCompanyLegal centre

© V5 Ultimate