MQ

MQ

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  Reconnect timed out

    Posted 06/10/26 07:44 AM
    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
    ------------------------------


  • 2.  RE: Reconnect timed out

    Posted 06/11/26 09:25 AM

    i'm certainly not an expert but what if you implement a short and a long retry interval, just like MQ has on its sender type channels? 
    During short retry interval (for example 10 minutes long) you frequently attempt the connection and after that you go over into a long retry interval where you attempt to make a connection every 20/30min for the next 24h. Only when the long interval has passed, only then throw an error? 
    This method only works when your application on openshift is not critical and allowed to retry for such a long time before giving an alert. 



    ------------------------------
    Stijn De Schutter
    ------------------------------