Contents
Cirrus Link Resources
Cirrus Link Website
Contact Us (Sales/Support)
Forum
Cirrus Link Modules Docs for Ignition 7.9.x
Inductive Resources
Ignition User Manual
Knowledge Base Articles
Inductive University
Forum
MQTT Engine supports 'String Replacement' for both MQTT Topics and Payloads for character sequences that will become part of an Ignition tag path. In many cases with Custom Namespaces this can be required if one does not have full control of the topics and payloads that are sent.
The String Conversion feature can be used in any Custom Namespace or in the Sparkplug B Namespace. The String Replacement feature supports the following.
Examples:
When an Ignition tag is created, there are some rules that need to be followed:
'
, -
, :
, (
, )
To determine the string replacement needed for the namespace:
Consider an incoming MQTT message with the characteristics:
A custom namespace with a subscription a/# will be able to receive the message however this will fail to be handled by the Custom Namespace and an error will be logged that looks like:
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:
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.