This is one topic in a series of blog posts.
- The ups and downs of MQ Reconnect – the basics
- The ups and downs of MQ Reconnect – what do I need to do to get it to work?
- The ups and downs of MQ Reconnect – the classic MQ scenarios
- The ups and downs of MQ Reconnect – how can I tell if automatic reconnect has happened?
- The ups and downs of MQ Reconnect – little problems
- The ups and downs of MQ Reconnect – frustrating problems.
What you need to do is documented here.
It has, One of:
- MQCONNX with MQCNO Options set to MQCNO_RECONNECT or MQCNO_RECONNECT_Q_MGR.
- Defrecon=YES|QMGR in mqclient.ini
- In JMS set the CLIENTRECONNECTOPTIONS property of the connection factory.
What queues can be used?
The client remembers which queues were used, and as part of the reconnection will open the queues on the applications behalf.
Permanent queues. You have to have the same queues defined on all systems
Dynamic queues. For example an application used SYSTEM.DEFAULT.MODEL.QUEUE. This created a queue AMQ.5C991A0D23B6310, and used it. When the reconnect occurs, the MQ client code opens SYSTEM.DEFAULT.MODEL.QUEUE and says use the name AMQ.5C991A0D23B6310.
When the application is reconnected, it can continue using the queue.
If you do MQOPEN SYSTEM.DEFAULT.MODEL.QUEUE and get back AMQ.5C991A0D23B6310, then try to open AMQ.5C991A0D23B6310 for example to use MQINQ and MQSET, or MQOO_INPUT. This will cause problem