I am using Payara Micro 5.181 with the MQTT JCA Adapter provided by the Payara Cloud Connectors (
https://docs.payara.fish/documentation/ecosystem/cloud-connectors/mqtt.html). My service has some MDBs listening to different MQTT topics. From time to time it happens that the connection to the MQTT broker drops and it is not automatically reestablished, despite having the property "automaticReconnect" set to "true". Now, Payara Micro is running in Docker and deployed on a Kubernetes cluster. Restarting the Kubernetes pod restarts the service and the connection is then established. My question is, how do I test if the connection to the broker is working? My idea is to add this check to the Kubernetes liveness check so that the pod can be automatically restarted in case of connection failure.