DefReconnect ( MQLONG)

The DefReconnect channel attribute sets the default reconnection attribute value for a client connection channel.

The default automatic client reconnection option. You can configure an IBM® MQ MQI client to automatically reconnect a client application. The IBM MQ MQI client tries to reconnect to a queue manager after a connection failure. It tries to reconnect without the application client issuing an MQCONN or MQCONNX MQI call.

Reconnection is an MQCONNX option. By using the DefReconnect channel attribute you can add reconnection behavior to existing applications that use MQCONN. You can also change the reconnection behavior of applications that use MQCONNX.

You can also set the DefRecon value from the mqclient.ini file to set or modify reconnection behavior. The DefRecon value from the mqclient.ini file takes precedence over the DefReconnect channel attribute.

Syntax

DefReconnect ( MQRCN_NO (default) |MQRCN_YES|MQRCN_Q_MGR| MQRCN_DISABLED )

Parameters

MQRCN_NO
MQRCN_NO is the default value.

Unless overridden by MQCONNX, the client is not reconnected automatically.

MQRCN_YES
Unless overridden by MQCONNX, the client reconnects automatically.
MQRCN_Q_MGR
Unless overridden by MQCONNX, the client reconnects automatically, but only to the same queue manager. The QMGR option has the same effect as MQCNO_RECONNECT_Q_MGR.
MQRCN_DISABLED
Reconnection is disabled, even if requested by the client program using the MQCONNX MQI call.

Automatic client reconnection is not supported by IBM MQ classes for Java.

Table 1. Automatic reconnection depends on the values set in the application and in the channel definition
DefReconnect Reconnection options set in the application
  MQCNO_RECONNECT MQCNO_RECONNECT_Q_MGR MQCNO_RECONNECT_AS_DEF MQCNO_RECONNECT_DISABLED
MQRCN_NO YES QMGR NO NO
MQRCN_YES YES QMGR YES NO
MQRCN_Q_MGR YES QMGR QMGR NO
MQRCN_DISABLED NO NO NO NO