Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Abstract

MQTT Engine Default Namespaces are used to provide support for Sparkplug compliant MQTT messages. Each namespace configuration represents a family of devices and/or data that MQTT Engine will support. A namespace defines the topics that each MQTT Engine client will subscribe on as well as indicates how the payload will be handled.

The default namespaces are provided out of the box and can be simple enabled or disabled.

Default Namespaces


NameNamespace TypeTopic Subscriptions
ElecsysElecsys

tags/#, RBE/#, JPG/#, sys/# and cmd/#

Sparkplug ASparkplugAspAv1.0/#
Sparkplug BSparkplugBspBv1.0/#
XirgoXirgo+/LSD/#


Anchor
SparkplugB
SparkplugB
Sparkplug B Payload

The Sparkplug Specification fully defines the payload definition and components and uses Google Protocol Buffers, referred to as Google Protobufs, as the data payload encoding method.

Below are examples of the payloads by message type:


Message TypeTopic ExamplePayload Example
NBIRTHspBv1.0/Facility1/NBIRTH/PLC1{"timestamp":1644444653413,"metrics":[{"name":"Sine0","timestamp":1644444653413,"dataType":"Int32","metaData":{"contentType":"","size":0,"seq":0,"fileName":"","fileType":"","md5":"","description":""},"properties":{"Quality":{"type":"Int32","value":192}},"value":-49},{"name":"Node Control/Next Server","timestamp":1644444653414,"dataType":"Boolean","value":false},{"name":"Sine 1","timestamp":1644444653413,"dataType":"Int32","metaData":{"contentType":"","size":0,"seq":0,"fileName":"","fileType":"","md5":"","description":""},"properties":{"Quality":{"type":"Int32","value":192}},"value":318},{"name":"Node Info/Transmission Version","timestamp":1644444653414,"dataType":"String","value":"4.0.10 (b2022020721)"},{"name":"bdSeq","timestamp":1644444653413,"dataType":"Int64","value":14},{"name":"Node Control/Rebirth","timestamp":1644444653414,"dataType":"Boolean","value":false}],"seq":0}
NDEATHspBv1.0/Facility1/NDEATH/PLC1{"timestamp":1644444569832,"metrics":[{"name":"bdSeq","timestamp":1644444569832,"dataType":"Int64","value":13}],"seq":0}
NDATAspBv1.0/Facility1/NDATA/PLC1

{"timestamp":1644444657313,"metrics":[{"name":"Sine0","timestamp":1644444655728,"dataType":"Int32","value":-48},{"name":"Sine 1","timestamp":1644444655728,"dataType":"Int32","value":319}],"seq":1}

{"timestamp":1644444661355,"metrics":[{"name":"Sine0","timestamp":1644444659744,"dataType":"Int32","value":-47}],"seq":3}

STATUSSTATE/MyPrimaryHostONLINE


Anchor
SparkplugA
SparkplugA
Sparkplug A Payload


Anchor
Elecsys
Elecsys
Elecsys


Anchor
Xirgo
Xirgo
X
irgo




Tip
See MQTT Engine Custom Namespaces for managing support for generic, non Sparkplug compliant MQTT messages with string based payloads.