In that way you described the mqtt node can give persistance on a power failure event because it is set as retained??
Yes, provided the feature is enabled in the MQTT broker (it is the default in Mosquitto (at least it always has been for me).
In that case it sounds as if the topic is already set as retained, so every time you connect it gives you the last value. I think you need to read this tutorial which will help you to understand the basics of MQTT MQTT Essentials - All Core Concepts explained
Thank you Colin. i will read this .