Download the sample solution: Edge IIoT Example.dbsln
This guide shows how to use the Edge IIoT Example, focusing on the built-in MQTT broker, data publishing in SparkplugB, and how external clients can consume this data.
Download and open the Edge IIoT Example project.
Verify the built-in MQTT broker operation.
Publish data using SparkplugB.
Demonstrate how external clients can access the data.
Download the Edge IIoT Example project (link available in the documentation).
Open the solution in Solution Manager.
The built-in MQTT broker is already configured in the example.
It starts automatically when the solution goes to Runtime → Startup, and it stops when the solution is shut down.
This process is controlled by tasks, ensuring proper initialization and shutdown.
You can check these tasks under ServerStartup and ServerShutdown, where the broker start and stop commands are defined.
No manual adjustment is required.
Navigate to Devices → Points.
Check the configuration for points prepared for publishing using the SparkplugB protocol.
Additionally, you can enable the option in Runtime → Startup called Publish to built-in MQTT broker.
Result: The configured points are published to the built-in broker in SparkplugB format.
Data can be accessed in two ways:
Via MQTT Broker (SparkplugB)
Any MQTT client (e.g., MQTT Explorer, Node-RED) can connect to mqtt://<server-IP>:1883
.
Subscribe to SparkplugB topics, for example:
spBv1.0/EdgeNode01/Group01/#
Via Internal Devices and TagProvider
The same data being published is also available through configured Devices inside the solution.
A TagProvider is also included, allowing internal access to the same values without going through the broker.
Open Property Watch to monitor tag values.
Confirm quality status: 192 = Good
.
Connect to the built-in broker using an MQTT client.
Validate that SparkplugB messages from the configured points are being received.
Built-in MQTT broker runs automatically.
SparkplugB data publishing is active.
Two access modes are available:
External consumption via MQTT clients.
Internal access via Devices and TagProvider.