Skip to content

[#598] Implemented major topic namespace changes for v4 - #617

Merged
wes-johnson merged 1 commit into
eclipse-sparkplug:developfrom
wes-johnson:develop
Aug 7, 2026
Merged

wes-johnson merged 1 commit into
eclipse-sparkplug:developfrom
wes-johnson:develop

Conversation

@wes-johnson

Copy link
Copy Markdown
Contributor

Adopt #598: Topic Prefix + Expanded MQTT Topic (device_tokens) for Sparkplug 4

Implements the topic-namespace changes agreed for #598.

Topic structure

Old: namespace/group_id/message_type/edge_node_id/[device_id]
New: [topic_prefix/]namespace/message_type/edge_node_id/[device_tokens]

  • Group ID removed, replaced by an optional, multi-level Topic Prefix that precedes the spCv1.0 namespace element (namespace-root grouping and ACL scoping). The STATE topic remains unprefixed.
  • device_id generalized to device_tokens — one or more trailing levels that identify a Sparkplug Device on the 'D' message types, and that may also relocate leading folders of a metric name onto the topic. 'N' message types never carry device_tokens.
  • Edge Node uniqueness is now keyed on topic_prefix + edge_node_id.

New concepts (defined normatively)

  • Sparkplug Descriptors — the Edge Node Descriptor (topic_prefix + edge_node_id) and the Device Descriptor (topic_prefix + edge_node_id + device_tokens).
  • Fully-qualified metric name — topic_prefix / edge_node_id / device_tokens / metric name.
  • descriptor_seq — a per-Sparkplug-Descriptor payload sequence number (in addition to the Edge-Node-wide seq) so a consumer can detect a gap on one specific Descriptor's BIRTH/DATA stream.
  • Command topics MUST match the target's BIRTH/DATA topic form (a Host MUST NOT swap metric-prefix tokens with device_tokens).
  • The namespace element denotes one of two valid namespaces: spCv1.0 (protobuf) and spJv1.0 (JSON, forthcoming).

Scope

Chapters updated: Introduction, Topics, Operational Behavior, Payloads, Security (ACL example), HA, Conformance, Appendix A, plus the three metric-structure diagrams. Examples reworked to a Unified Namespace / ISA-95 style (Acme/Dublin/Packaging / EdgeNode1 / Filler). Editorial cleanup: em-dashes and stray semicolons removed from prose; "broker" changed to "MQTT Server".

TCK

  • Monitor.java updated to the renamed statement IDs and section anchors. Usages of the removed device_id uniqueness/duplication statements are stubbed with // TODO(#598).
  • AwareBrokerTest.java re-pointed to CONFORMANCE_MQTT_AWARE_BASIC to fix a pre-existing conformance-chapter staleness (unrelated to Sparkplug 4: Expanded MQTT Topic : Move "group" to be ahead of spBv1.0 #598) so the module compiles.

The TCK now compiles and builds, but the topic-parsing model (Monitor / Topic / EdgeNodeDescriptor) still assumes the old structure and needs a rewrite for functional coverage — tracked as follow-up.

@wes-johnson
wes-johnson merged commit 631d993 into eclipse-sparkplug:develop Aug 7, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants