MQTT Generic - retained flag not working


I am having issues with “retained” flag in mqtt. Even if i set retained=true in the config file messages are not send with retain flag.

My Thing:

Thing mqtt:topic:arduinoBoiler "Arduino boiler" (mqtt:broker:local)
        Type number : targetTemp "Target temperature" [ stateTopic="arduino-boiler/out/target", commandTopic="arduino-boiler/in/target", formatBeforePublish="%.0f", retained=true ]

When I send command to the linked item message gets published - however without the retain bit set.
I have also noticed, that when i display the thing config code in paper ui, the retained flag is set to false. However retainMessage flag is set to true. No idea what that is.

I have tried using retained="true", retained=1 in the config file, but nothing seems to work.
Any ideas what am I doing wrong please?

Seems like restarting whole OpenHab resolved the issue, but that should not be necessary. :confused:

It’s a known limitation with using .things files. OH doesn’t always pick up changes to those files until a restart of OH. There have been some recent changes to the file watcher in OH 4 so perhaps this will be addressed. But as long as you use .things file you’ll have to remember to restart OH to pick up changes. Or use managed Things.