Course C2 · Industrial

PubSub, MQTT and the UNS

Client-server does not fan out. This course covers OPC UA PubSub (the Part 14 model, UADP and JSON encodings, the UDP, Ethernet and MQTT mappings) and how it relates to a unified namespace, Sparkplug B and the determinism work in UAFX.

Lessons11
Timeabout 88 minutes
PrerequisitesA4
CostFree: written lessons open, video and labs need a free account

What you will be able to do

  • You can choose between client-server and PubSub for a given flow.
  • You can configure a publisher and subscriber and read the wire format.
  • You can design an MQTT topic structure that survives a second machine.
  • You can explain why non-reversible JSON silently loses type information.
  • You can say what UAFX and TSN are for without overselling them.

Syllabus

  1. 1
    Decide whether you need PubSub at all

    Most plants do not. The honest test, and the cost of adding it when you did not need to.

    Asset A decision table over eight real data flows with the reasoning for each

    7 min
  2. 2
    Learn the Part 14 model

    PublishedDataSet, DataSetWriter, WriterGroup, DataSetReader. Four objects that account for most of the confusion.

    Asset A configured publisher and subscriber with every object named in the config

    9 min
  3. 3
    Choose UADP or JSON

    Binary efficiency against human readability, and where each belongs.

    Asset The same dataset on the wire in UADP and in JSON, byte counts included

    7 min
  4. 4
    Avoid the non-reversible JSON trap

    Non-reversible JSON loses type information and cannot be round-tripped. Also: Good is 0 and is omitted, so a missing status means Good, not missing data.

    Asset The same DataValue in reversible and non-reversible JSON, with what is lost marked

    8 min
  5. 5
    Publish over MQTT

    The broker mapping, topic naming, retained messages and QoS: the configuration most people actually deploy.

    Asset A publisher to Mosquitto with the messages captured in MQTT Explorer

    9 min
  6. 6
    Publish over UDP multicast and Ethernet

    Local real-time fan-out, the multicast address, and when raw Ethernet earns its complexity.

    Asset A UDP multicast publisher captured in Wireshark with the UADP header decoded

    8 min
  7. 7
    Understand key frames and delta frames

    Sending only what changed, and the reason a subscriber that joins late sees nothing until the next key frame.

    Asset A capture showing key and delta frames, with a late subscriber's blank period

    7 min
  8. 8
    Secure PubSub with a key service

    PubSub has no session, so key distribution works differently. What the SKS does.

    Asset A secured PubSub group with the key exchange traced

    7 min
  9. 9
    Build a topic structure that scales

    Deriving topics from browse paths, and the naming decisions that hurt at machine number two rather than machine number one.

    Asset A topic tree for a 40-machine plant, with the three naming mistakes it avoids

    9 min
  10. 10
    Compare with Sparkplug B

    Where Sparkplug overlaps, where it does not, and why the two coexist in real plants.

    Asset The same machine published as OPC UA PubSub and as Sparkplug B, both payloads shown

    9 min
  11. 11
    Know what UAFX and TSN are for

    Controller-to-controller communication and deterministic Ethernet. What is released, what is not, and why this is not what your OEE project needs.

    Asset The released UAFX nodesets with their versions and publication dates, and what each covers

    8 min

Lab

Free account required

Publish two values to a local Mosquitto broker as OPC UA PubSub over MQTT, inspect the payload in MQTT Explorer, then switch the encoding to non-reversible JSON and identify what disappeared.

Unlock the lab →
Specification background

Last verified 7 September 2026 against OPC UA 1.05.07. OPC UA Connect is an educational resource and is not affiliated with the OPC Foundation.

Free download
OPC UA Machine Data → OEE Mapping Kit
Which nodes to subscribe to, how they become Availability, Performance and Quality, and which companion specification already gives you the answer, so you stop inventing tags.
Get the free mapping kit →
Free, no course, no login