Item status when reboot openhab with mqtt

I started using the broker MQTT (mosquitto) version 1.x with my OH version 2.4
I realized that if I restart OH does not remember the last status of the item (ON … OFF … percent … ect)
Using influx.db, as a persistence service, to record data from temperature and humidity sensors, can I use the same for item statuses? or is there another method?
Thanks for your help
David

You probably want to look into both OH restore on startup and MQTT retained

thank you, I read everything and do tests! :wink:

so in summary, if I understand correctly, in my case, where I just want OH to remember the last state of the item, in case of reboot, the solution most indicated is the Mapdp persistence service?

For that purpose, yes.
Have a good think about if that is what you really want - having your rules operate on old stale data. You can write them to do nothing drastic until data becomes available.

seems to work, thanks for the help