if you work in MQ and want to solve this problem, install a local instance of MQ. More licenses, but you'll get a delivery guarantee if your core corporate MQ goes down.
Alternatively, use Spring and let the infrastructure perform a connection recovery.
source share