I have the SparkplugB default namespace enabled in the MQTT Engine module settings. I have a tag change script which executes when one of the tags created by the SparkplugB subscription changes. The problem is, the script must read multiple tag values from one SparkplugB topic update and not all the tags update at the same time. I've noticed some of the values in the tag change script reference values from the previous topic update.
I have a similar script running with a generic JSON mqtt client. I was able to create a custom namespace and unchecked the "Parse the payload as a JSON string".
This created tags which contained all the values from the update in one string and fixed the issue of reading old topic values.
Can I do a similar thing with the SparkplugB client? I created a custom namespace, but the values are encoded still.
Most likely you can't do what you want this way. Sparkplug messages can contain any number of metrics per message, and all metrics are sent on the same few MQTT topics, so you can't tell which one is in any particular message just based on that.
More likely, the simpler route might be to make the metrics that you want to update as a group into a UDT and have the Sparkplug edge node send them that way. The whole UDT will update at once that way. What software or equipment are you using as your Sparkplug edge node?
Another possible route that I've seen used when a UDT isn't an option is to have the edge node have a "report count" metric or "report finished" metric that is bumped to a new value just after all other metrics have been reported. Then you can have your tag change event triggered on that one specific metric and know that the others are up to date first.