Mqtt embedded broker not responding

A better solution would be to

  1. file an issue on the embedded broker, see How to file an Issue. I believe the repo is openhab2-addons.

  2. Switch to using an external MQTT broker like Mosquitto.

In all likelihood the root of the problem is upstream from openHAB so it might take some time to be fixed. Mosquitto is a pretty rock solid broker and it will be a whole lot less work to install and configure it than to write something that reboots your OH every night.