Monitor MQTT connection

13 views
Skip to first unread message

G Manfredi

unread,
Jun 20, 2018, 9:50:23 AM6/20/18
to Payara Forum
Hi,

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.

Thank you in advance for your answers
Reply all
Reply to author
Forward
0 new messages