Sending empty JSON array to custom namespace

I am sending the following payload to a custom namespace.

{
  "observation": {
    "time": 1678417316996,
    "machine": "f_sim_mqtt_long",
    "name": "alarms",
    "marker": [
      {
        "type": "path",
        "number": 1
      }
    ]
  },
  "state": {
    "time": 4306.0879,
    "data": {
      "alarms": [
        {
          "path": 1,
          "axis_code": 0,
          "axis": "",
          "number": 100,
          "message": "PARAMETER ENABLE SWITCH ONY",
          "type_code": 0,
          "type": "SW"
        }
      ]
    }
  }
}

Which comes across in tag browser as this:

However, after sending an empty array to $.state.data.alarms, the array is never cleared in the tag browser and no exceptions in the logs.

{
  "observation": {
    "time": 1678417363283,
    "machine": "f_sim_mqtt_long",
    "name": "alarms",
    "marker": [
      {
        "type": "path",
        "number": 1
      }
    ]
  },
  "state": {
    "time": 12921.8673,
    "data": {
      "alarms": []
    }
  }
}

Why is this?

I’m not sure of the significance of the topic $.state.data.alarms. But, I’d guess it has some non-standard MQTT feature of your MQTT server? Regardless, MQTT Engine will not ever delete tags in a custom namespace automatically. If you want them deleted, it must be done manually or via a script.

$.state.data.alarms was just a path to the delta of the payload.

What you are saying about not deleting tags in a custom namespace explains the behavior though.