Versions Compared

Key

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

...

Code Block
{
    "level": "value1"
}

{
    "level": {
        "key": "value2"
    }
}


MQTT Engine will initially create the tag with the tagpath of "[MQTT Engine]a/b/level" with a value of 'value1'.

Now, when the second payload arrives on the same topic, since MQTT Engine does not automatically delete tags, it will try to create the tag "[MQTT Engine]a/b/level/key" with a value of 'value2'. However, level at this point is a leaf tag, not a folder. So, the new leaf tag called 'key' can not be created.


Tip
Our recommendation to manage MQTT messages published with the same topic and changing payload JSON structures, is not to use the built in JSON parsing option in the Custom Namespace but to leave parsing as a string, create a tag change script and parse teh string in a custom script per your requirements.