Data model
Unified Namespace (UNS)
The topic layout, payload and MQTT v5 user properties of the Factory+ Unified Namespace, and which data appears on it.
The Unified Namespace (UNS) is a second view of the broker’s live data, laid out by where things are in the plant.
Sparkplug lays the same data out by how it is connected. A Sparkplug topic names a group, an edge node and a device, and that tells a consumer how the data reached the broker but not where the machine is. Sparkplug payloads are Protocol Buffers that only make sense next to the device’s birth certificate. Business systems such as an MES or an ERP system want neither of those things.
The UNS republishes each device’s metrics under its ISA-95 hierarchy, one topic per metric. Each payload is a small JSON object, and the metadata travels in MQTT v5 user properties. A consumer can subscribe to one machine, one area or a whole site and read the values without any Sparkplug state.
The UNS carries the same data as Sparkplug and adds none of its own. A UNS ingester subscribes to Sparkplug, keeps each device’s birth certificate and publishes every DATA and birth message again on the UNS. Consumers that need history read it from a historian, and consumers that want a structured northbound interface use i3X.
flowchart LR
EA[Edge Agent] -- "Sparkplug B<br/>spBv1.0/..." --> B[(MQTT broker)]
B --> I[UNS ingester]
I -- "JSON + user properties<br/>UNS/v1/..." --> B
B --> C1[MES / ERP / dashboards]
B --> C2[UNS historian]
Requirements on the broker
The UNS carries its metadata in MQTT v5 user properties. The broker that carries the UNS MUST support MQTT v5, and UNS consumers MUST connect with MQTT v5 to read the metadata. A consumer that connects with MQTT 3.1.1 receives the payloads without the user properties, and then has no type, unit or UUIDs for any value.
Access to UNS topics is controlled in the same way as access to Sparkplug topics. It uses the permissions listed under Permissions and the template mechanism of MQTT.
Topics
Every UNS topic has this form:
UNS/v1/<Enterprise>[/<Site>[/<Area>[/<Work Center>[/<Work Unit>]]]]/Edge/<device>/<metric>
| Segment | Meaning |
|---|---|
UNS/v1 | The fixed prefix. v1 is the version of this topic layout. |
<Enterprise> to <Work Unit> | The device’s ISA-95 levels, from one to five of them, Enterprise first. |
Edge | The source of the data. Data republished from Sparkplug MUST use Edge. This version of the UNS reserves only Edge and gives no meaning to any other source segment. |
<device> | The device’s Sparkplug device ID, exactly as it appears in the Sparkplug topic. |
<metric> | The metric’s name from the device’s birth certificate, including any / folders it has, such as Phases/1/Voltage. |
Only devices have UNS topics. Edge node births and node DATA messages are not republished, because an edge node has no place of its own in the ISA-95 hierarchy.
The ISA-95 levels
The levels come from the device’s birth certificate. The UNS rule on the ISA-95 page defines them in full, and its main points are these.
- Only a Hierarchy-v1 object at exactly
Device_Information/ISA95_Hierarchyin the birth counts. A hierarchy anywhere else in the birth is ignored. - The levels are read in the order Enterprise, Site, Area, Work Center, Work Unit. The fourth and fifth levels are spelled
Work CenterandWork Unit, with a space and the US spelling of “Center”. Those are the metric names in the Hierarchy-v1 schema. - Each value is trimmed of leading and trailing white space.
- Reading stops at the first empty level. A value below an empty level is never read and never appears in a topic.
- The Enterprise MUST NOT be empty. A device with no Enterprise is not on the UNS.
- A level that is read MUST NOT contain
/,+,#or the NUL character (U+0000). - A level that is read MUST NOT be the word
Edge. - If a device breaks either of these two rules, it is left off the UNS entirely. It is not published at a shorter path than the one it asked for.
MQTT forbids +, # and NUL in a topic name. Consumers split topics on /, and they find the end of the levels by looking for the first Edge segment.
Spaces and other characters are allowed, and Work Center values such as Cell 4 appear in topics as they are.
The device and the metric
A UNS ingester MUST NOT publish a device whose topics would contain +, # or NUL in the device ID. It MUST NOT publish a metric whose topic would contain one of those characters. It MUST NOT publish a metric whose topic would be longer than 65,535 bytes, the MQTT limit on a topic name.
The metric segment is the metric’s full birth name. A metric named Phases/1/Voltage therefore adds three levels to the topic. Consumers that need to separate the device from the metric MUST use the first Edge segment and the segment after it. They MUST NOT assume a fixed number of levels.
Worked examples
These examples use a device whose Sparkplug device ID is CNC-07.
| Hierarchy in the birth | Metric | UNS topic |
|---|---|---|
Enterprise Acme, Site Plant 1, Area Machining, Work Center Cell 4, Work Unit Lathe 2 | Spindle/Speed | UNS/v1/Acme/Plant 1/Machining/Cell 4/Lathe 2/Edge/CNC-07/Spindle/Speed |
Enterprise Acme, Site Plant 1, Area Machining, nothing below | Spindle/Speed | UNS/v1/Acme/Plant 1/Machining/Edge/CNC-07/Spindle/Speed |
Enterprise Acme, Site Plant 1, Area empty, Work Center Cell 4 | Power | UNS/v1/Acme/Plant 1/Edge/CNC-07/Power (reading stops at the empty Area, so Cell 4 is not used) |
Enterprise Acme, Site Plant 1 (with spaces around them) | Power | UNS/v1/Acme/Plant 1/Edge/CNC-07/Power (values are trimmed) |
Enterprise empty, Site Plant 1 | any | None. The device is not on the UNS. |
Enterprise Acme, Site Bay 3/4 | any | None. Bay 3/4 contains /. |
Enterprise Acme, Site Edge | any | None. Edge is reserved. |
No Hierarchy-v1 object at Device_Information/ISA95_Hierarchy | any | None. |
Messages
A UNS ingester publishes one UNS message for each topic that a Sparkplug message touches. If one Sparkplug message carries several samples of the same metric, they go in one UNS message. The newest sample is the value and the older ones go in a batch.
The messages are published in the order their topics first appear in the Sparkplug message. They are published at QoS 0 and without the retain flag. A new subscriber therefore sees a value only when the metric next changes or the device next births.
A birth certificate also produces UNS messages, because the values in a birth are current data.
Payload
The payload is a UTF-8 JSON object:
{
"timestamp": "2026-10-20T21:26:10.030000000Z",
"value": 1502.5,
"batch": [
{ "timestamp": "2026-10-20T21:26:09.030000000Z", "value": 1498.5 },
{ "timestamp": "2026-10-20T21:26:09.530000000Z", "value": 1500.25 }
]
}
| Key | Present | Meaning |
|---|---|---|
timestamp | Always | The time of the newest sample, as an ISO 8601 string in UTC. |
value | Always | The newest sample’s value, typed by the rules below. |
batch | Only when the message holds more than one sample | The older samples, oldest first, each an object with timestamp and value. |
The keys are lower case. The top-level value and timestamp are always the newest sample, and a consumer that wants only the current value can ignore batch. Samples are ordered by timestamp. Of two samples with the same timestamp, the one that came later in the Sparkplug message counts as newer.
Timestamps
A UNS ingester writes each timestamp as an ISO 8601 date and time in UTC with exactly nine fractional digits and a Z, for example 2026-05-28T15:46:56.100923659Z. The string gives a time in nanoseconds since the Unix epoch.
The timestamp of a sample is the metric’s own Sparkplug timestamp. If the metric has none, the ingester uses the Sparkplug payload’s timestamp. If that is missing too, it uses the time it received the message.
Factory+ Sparkplug timestamps are in nanoseconds, unlike Sparkplug B, as described in Sparkplug in Factory+. An ingester reads a Sparkplug timestamp below 10^15 as milliseconds and any other as nanoseconds.
Consumers SHOULD accept any ISO 8601 date and time, with or without a fractional part and with an offset in place of Z, because UNS messages can come from publishers other than the Sparkplug ingester. A consumer that needs nanosecond precision reads all nine digits.
Values
A value keeps its JSON type, chosen from the metric’s Sparkplug datatype in its birth certificate:
| Sparkplug datatype | JSON value |
|---|---|
| Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64 | A JSON integer, written exactly. A consumer that reads JSON numbers as 64-bit floats loses precision above 2^53. |
| Float, Double | A JSON number. NaN, positive infinity and negative infinity are written as null, because JSON has no form for them. |
| Boolean | true or false. |
| String, Text, UUID | A JSON string. |
| DateTime | A JSON integer holding the value as the Sparkplug metric carried it. Sparkplug defines it as milliseconds since the Unix epoch. |
| Bytes, File | The object {"type":"Buffer","data":[104,105]}, where data lists the bytes in order as integers from 0 to 255. This encoding is part of the UNS contract. A publisher MUST write it in this form, and a consumer MAY rely on it. |
The Type user property names the datatype. A consumer MUST use Type, not the JSON type of the value, to decide how to store or convert a value. If a Double holds a whole number, it is written without a fractional part, and 5.0 appears as 5 and looks like an integer in JSON.
User properties
Each message carries its metadata as MQTT v5 user properties. Every property is a string, including the ones that hold booleans. A consumer compares Transient with the string "true", not with a boolean. The properties come from the first sample in the message and appear in this order:
| Property | Always present | Value |
|---|---|---|
InstanceUUID | Yes | The top-level Instance_UUID from the device’s birth. It identifies the device. |
SchemaUUID | Yes | The top-level Schema_UUID from the device’s birth. It identifies the device’s schema. |
Transient | Yes | "true" when the birth marks the metric as transient in Sparkplug, otherwise "false". A transient metric’s values are not meant for a historian. |
Unit | Yes | The metric’s engineering unit, from the engUnit property of its birth metric. It is "" when the metric has none. |
Type | Yes | The metric’s Sparkplug datatype from its birth, named as in the table above (Int32, UInt64, Double, Boolean, String, DateTime, Text, UUID, Bytes, File and so on). |
InstanceUUIDPath | Yes | The device’s top-level Instance_UUID and a colon. After the colon come the Instance_UUID values of each schema object in the birth that encloses the metric, outermost first, joined with colons. A metric at the top level of the device has nothing after the colon. |
SchemaUUIDPath | Yes | The same as InstanceUUIDPath, built from the Schema_UUID values. |
Simulated | No | "true" when the Sparkplug metric carries a simulated property that is set. It is left out for real data. |
RunId | No | The run_id property of a simulated metric, when it has one. |
A schema object in the birth is the set of metrics under one path that carries an Instance_UUID metric. The object at path Phases/1 is identified by the metric Phases/1/Instance_UUID. An object encloses a metric when the object’s path followed by / is a prefix of the metric’s name. The match is on whole path segments, and Phases/1 encloses Phases/1/Voltage but not Phases/10/Voltage. SchemaUUIDPath uses the same objects, with their Schema_UUID metrics.
For example, take a device whose schema has a Phases/1 sub-object. Its Phases/1/Voltage metric gives an InstanceUUIDPath of the form <device Instance_UUID>:<Phases/1 Instance_UUID>. A top-level Power metric gives <device Instance_UUID>:.
The Simulated and RunId properties let edge simulators publish test data that consumers can tell apart from real data. A consumer that must ignore simulated data checks for Simulated.
What is published and what is skipped
A UNS ingester publishes a device only when all of these hold:
- The birth is a Factory+ payload and gives the device a valid ISA-95 hierarchy by the rule above.
- The birth has a top-level
Instance_UUIDand a top-levelSchema_UUID, both strings. - The device ID gives topics MQTT allows.
If any of these fails, no topic of that device is published from its birth or from its DATA until the device births again with valid data.
Within a published device, a UNS ingester MUST NOT publish:
- a sample whose value is null
- a metric whose last name segment is
Instance_UUIDorSchema_UUID, because those values are already in the user properties - a metric with
Device Controlanywhere in the part of its name before the last/, because those metrics are commands to the device and not data about it - a metric whose datatype is DataSet, Template, PropertySet, any array type, or a type the ingester does not know, because none of them has a defined UNS payload in this version
- a sample whose DATA message gives a different datatype from the birth, or whose value is not valid for its datatype, because publishing it would put a value of the wrong type on the topic
- a sample whose metric has an engineering unit that is not a string, number or boolean, because the
Unitproperty must be text - a sample marked as simulated whose
run_idproperty is set but is not a string or an integer, because theRunIdproperty must be text - a sample where a
Schema_UUIDorInstance_UUIDin the chain above the metric is not a string, because theSchemaUUIDPathandInstanceUUIDPathproperties are built from them - a metric whose topic MQTT would refuse.
Transient metrics are published, and the Transient property marks them for consumers. Each historian that reads the UNS decides for itself whether to record them and documents that choice.
Permissions
The UNS uses MQTT permissions in the same way as Sparkplug. Each permission carries a template that maps topic filters to access, as described under MQTT. These two well-known permissions cover the whole UNS:
9fa6ff20-9d2a-4444-960c-40ebcf56f5b4{ "UNS/v1/#": "w" }
ffa40b36-3a61-4545-832a-2d1e8b860d63{ "UNS/v1/#": "rs" }
A site can give a consumer only part of the UNS by defining its own permission with a narrower template, such as UNS/v1/Acme/Plant 1/#. This works because the ISA-95 levels sit at the front of every topic.