Hello experts,
I have a Spring Boot application deployed on OpenShift that connects to a Queue Manager (QM).
Currently, the application has reconnect logic in place. When the connection to the Queue Manager is lost, the application attempts to reconnect for up to 10 minutes. If it is unable to re-establish the connection within that period, it stops retrying and throws a timeout/error condition.
I need the application to automatically recover even if the Queue Manager becomes available after the 10-minute reconnect window. One approach I am considering is having the application restart itself (or trigger a pod restart) once the reconnect attempts have been exhausted, so that it can establish a fresh connection when the Queue Manager is available again.
Since the application is running on OpenShift, what would be the recommended approach to achieve this? Has anyone implemented a similar recovery mechanism for Spring Boot applications running in containers? Are there OpenShift-native patterns (e.g., liveness/readiness probes, pod restarts, health checks) that would be preferable to increasing the reconnect timeout?
Any suggestions or best practices would be appreciated.
------------------------------
madhu ram
------------------------------