Setting Up Application Reconnect in a Multi-instance Queue Manager

XA reconnect enables reconnection to the standby MQ Queue Manager in a Multi-Instance Queue Manager (MIQM) when connection to the active queue manager is lost in both transaction processing and batch programs.

XA Reconnect

The XA reconnect is performed as part of the processing in the SEP. See Enterprise Server SEP XA Reconnect for more information. If the environment variable ES_XA_RECONNECT is set to any value, the system will attempt to reconnect to an XA resource when the connection is lost. In the context of a MIQM configuration where connection to the active instance is lost, if the ES_XA_MQ is set to MIQM then the XA reconnect processing in the SEP will attempt to switch to the newly active MQ instance.

Configuring XA Reconnect for an Multi-instance Queue Manager

To further configure XA reconnect for an MIQM, you must specify three environment variable ES_XA_RECONNECT, ES_XA_MQ, and MQSERVER.

The environment variable ES_XA_MQ is used to enable the reconnection to the standby queue manager when the connection to the active queue manager is lost:

ES_XA_MQ=MIQM

In addition, the environment variable MQSERVER must be set so that the system can verify that at least 2 connections are listed. For example:

MQSERVER=CHANNEL1/TCP/10.120.99.999(1414),10.120.98.888(1414)

XA Entry Definition

To enable the system to connect to the active queue manager in an MIQM at region startup, an XA entry must be created that will point to the first address listed in the MQSERVER environment variable.

Important: You cannot use the MQ related entries in the SIT to configure MQ. The XA connection must be specified as part of the XA resources of your region using Micro Focus Directory Server (MFDS) or Enterprise Server Common Web Administration (ESCWA).

The following is an example XA entry for an active MIQM MQ instance:

ID: 
MQPROD
Open string
TPM=ESCICS,AXLIB=casaxlib,QMNAME=MIQM001,uid=mq01@MYCORPDOM,pwd=MQadmin,CHANNEL=CHANNEL1,TRPTYPE=TCP,CONNAME=10.120.99.999(1414)

At the point XA entries are installed, the system will create an XA entry for the standby entry which will be identical to the active definition except for the name and the CONNAME.

If the example MQPROD is already specified then the dynamically created instance entry will be:

ID: 
MQPRO#
Open string
TPM=ESCICS,AXLIB=casaxlib,QMNAME=MIQM001,uid=mq01@MYCORPDOM,pwd=MQadmin,CHANNEL=CHANNEL1,TRPTYPE=TCP,CONNAME=10.120.88.888(1414)

Where the ID and the CONNAME is different. This entry will be installed but will not be activated until the connection to the first active instance is lost. When this connection loss takes place, the active connection will be replaced with that of the standby MQ instance which now becomes active and the previously active instance become the standby instance.

Both connections appear active but only the active one is enrolled in the XA transaction.

Note: To switch back to the initial queue manager, stop the currently active queue manager, the enterprise server will then regain the connection to the original queue manager.
Note: The hostname or IP address specified in the CONNAME option of the XA open string must be consistent with the hostname or IP address in MQSERVER.