Learn about data source configuration reference for MQTT Sparkplug
- Last UpdatedJan 14, 2025
- 2 minute read
This section contains information regarding additional data source configuration information for the connector.
Topics adhere to the MQTT and Sparkplug specification and must follow these rules:
-
Topic names and topic filters are divided into topic levels using the / character.
-
# is the multi-level wildcard and must be specified on its own or following the / character. # must be the last character.
-
+ is the single-level wildcard and can be used at any level. + must occupy an entire level. + can occur multiple times within a topic filter and can be used in conjunction with the # wildcard.
Note: Topic names are case sensitive and must follow the Sparkplug format of namespace/group_id/message_type/node_id/[device_id].
-
For a more detailed description on topics please refer to the MQTT specification and the Sparkplug specification.
Here are three examples of Topics CSV files you may find useful:
-
Example1.csv
#
Subscribe to all available topics.
-
Example2.csv
spBv1.0/Sparkplug B Devices/DDATA/Edge Node 1/#, 0
spBv1.0/Sparkplug B Devices/DDATA/Edge Node 2/#, 1
spBv1.0/Sparkplug B Devices/DDATA/Edge Node 3/#, 2
spBv1.0/Sparkplug B Devices/NBIRTH/Edge Node 1, 0
spBv1.0/Sparkplug B Devices/NBIRTH/Edge Node 2, 0
spBv1.0/Sparkplug B Devices/NBIRTH/Edge Node 3, 0
spBv1.0/Sparkplug B Devices/DBIRTH/EdgeNode 1/+, 0
spBv1.0/Sparkplug B Devices/DBIRTH/EdgeNode 2/+, 0
spBv1.0/Sparkplug B Devices/DBIRTH/EdgeNode 3/+, 0Subscribe to topic Edge Node1 and its child topics with QoS 0, topic Edge Node 2 and its child topics with QoS 1, and topic Edge Node 3 and its child topics with QoS 2. It is required to also capture NBIRTH and DBIRTH, which are required for birth certificates and populating the data selection. You can use a generic wild card to capture NBIRTHs and DBIRTHs for simplicity, that is:
spBv1.0/SparkplugB Devices/NBIRTH/#, 0
spBv1.0/SparkplugB Devices/DBIRTH/#, 0)You may see extraneous elements and PI tags in data selection which will never be updated (for example Edge Node 4, Edge Node 5, etc.).
-
Example3.csv
+/MyGroup/#
Subscribe to any topics that have MyGroup as the second level. For example,
-