I found an issue with data retention and it took me quite a while to figure out when exactly it happens.
Using MQTT my data used to be stored just fine until an update earlier this year (not sure when exactly, probably between march and june 2017, maybe earlier).
Before the update, all data would be retained automatically. Now the ‘retain’ flag in the MQTT header has to be set. So far so good. It works when I test it using MQTT.fx to manually submit messages.
BUT: only if the channel in the topic is an integer. If I use any other name for the channel number it gets published and displayed fine but the data is not retained. This used to work fine prior to the upgrade.
topic: “v1/username/things/clientID/data/2” data: “temp,c=12” -> works fine (if retain flag is set)
topic: “v1/username/things/clientID/data/Sensor1” data: “temp,c=12” -> does not work (channel shows in dashboard but data is not retained)
The only workaroud is to only use integer channel names. Can this be fixed?