I found a situation where if my server reboots then OpenHAB starts up first before my MQTT broker, The OH logs show me that the connection to the broker failed which I understand because it wasn’t up and running yet… But a few minutes later it is up and running.
Should OH attempt to reconnect to a broker that failed to connect during OH startup?
Maybe this is something resolved in 1.8.x?
My plan is to delay the start of OpenHAB after a reboot to allow the broker to start up fully.
I don’t know if there is a better approach, but you could try to use your openhab.cfg to read the openhab.cfg in time intervals (and therefore reread the mqtt broker setup):
# The refresh interval for the main configuration file. A value of '-1'
# deactivates the scan (optional, defaults to '-1' hence scanning is deactivated)
#mainconfig:refresh=