Versions Compared

Key

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

...

Code Block
INFO   | jvm 1    | 2022/01/06 11:33:29 | E [c.c.m.e.g.j.JsonPayloadHandler] [19:33:29]: Failed to handle tagPath - not adding tag: a/b/tag@2 - Remove it from future payloads

Using 'String Conversions' can allow this tag to be created. Consider the following String Conversion:

Image Added

This tells MQTT Engine that for this custom namespace, convert any '@' characters that would normally be part of the tag path to '_' characters. So now when we publish the same MQTT message, we don't get an error message and the tag gets properly created as shown below with the  @ character replaced by a _ character.

Image Added

The String Conversion feature can be used in any Custom Namespace or in the Sparkplug B Namespace. The String Replacement feature supports the following.

  • Replacements are executed using the 'Order Index' order from lowest to highest.
  • Single character to single character replacement
  • String to string replacement
  • Character or string to nothing (i.e. removes a character)
  • Regular Expression (regex) to string, character, or nothing replacement (i.e. uses a regex for pattern matching rather than a literal string)

Examples:

  • Remove all @ symbols:
    Image Added

Additional Resources