Subscribe and decode Sparkplug B payloads with custom code

Hi there,
We would like to create a custom app that subscribes to topics in the MQTT broker in Ignition Distribution module. Are there any examples in your developer docs that demonstrate how to do this ?
Specifically, how to decode the Sparkplug B payloads ?
Most of the examples I have seen demonstrate how to connect and publish data.

Many thanks,
Damien.

Take a look at this example: tahu/sparkplug_b/tools/java_sparkplug_b_listener at develop · eclipse/tahu · GitHub

This example only shows how to print the payload in a JSON format. But, the decoded payload can be picked apart after it is in the SparkplugBPayload object.

Thanks for the fast response Wes.
Looking into the code example you provided, it has a dependency on the SparkplugBPayloadDecoder module which encapsulates the detail about decoding the payload.
Do you know if there is an equivilent module available for .Net ?
Failing that, is the specification for the encoding/decoding algorithm published somewhere ( I can’t seem to find anything in the official spec?

There is the rudimentary C# library here: tahu/client_libraries/c_sharp at develop · eclipse/tahu · GitHub

This is purely Google Protobuf generated code based on the proto definition file here (which is used for all Sparkplug B payloads): tahu/sparkplug_b.proto at develop · eclipse/tahu · GitHub

I know people have used that C# library to build apps. But, we haven’t yet gotten any contributions around C# into Eclipse Tahu. It would be nice to have a wrapper library like we do for Java :wink: