+

Search Tips | Advanced Search

How automatic balancing uses automatic reconnect

From Version 9.2.0, uniform cluster automatic balancing makes use of enhancements to the existing automatic reconnect feature of IBM MQ .

In versions of IBM MQ before Version 9.2.0, the automatic reconnect feature automatically reconnects to a standby instance of a queue manager, or to a different queue manager, based on the connection details provided, typically a connection name list, or a Client Channel Definition Table (CCDT).

The IBM MQ client, in some circumstances silently performs the reconnection without the application being aware it has happened. The decision of which queue manager to reconnect to is entirely down to the sequence of connection names in a connection name list, or the workload balancing configuration in the CCDT.

From Version 9.2.0 it is possible for a reconnect request to be sent to a client containing a hint of which queue manager the client should reconnect to. In many reconnect scenarios, such as a queue manager failure, or the administrator issuing the command endmqm -r, a queue manager name is not included in the hint information, and automatic reconnect behavior works as it does currently.

However, if you have configured a uniform cluster, automatic application balancing periodically sends reconnect requests to clients, in order to achieve a balanced cluster. In these cases the uniform cluster specifies a queue manager name in the reconnection hint to ensure that client connections are moved to the queue managers that have the least connections.

For automatic balancing to work it is important that the:

  • IBM MQ applications use CCDTs to retrieve connection information from.
  • CCDTs contain an entry for every queue manager in the uniform cluster

If this is not the case it is not possible for the cluster to automatically balance applications across all members of the cluster.

If an application is using a version of the IBM MQ client that is earlier than Version 9.2.0, and it is configured to support automatic client reconnection, then it might be sent a request by the uniform cluster to go through its reconnect steps.

The client will not be asked to reconnect to a specific queue manager, but instead goes through the same sequence of reconnect logic it would do for other reconnect events. It is possible to achieve even distribution of client applications prior to Version 9.2.0 across the uniform cluster by ensuring that clients are configured to use CCDTs containing evenly weighted entries for each member of the cluster.

Applications can take several reconnect attempts, before connecting to a queue manager that needs the additional instance, and as such it is a less efficient way of achieving even distribution of applications across the cluster. Automatic balancing can take longer to achieve in these environments.


IBM MQ clients not supporting automatic client reconnection

If an application is using a version of the IBM MQ client that does not support automatic client reconnection, the application might receive a failure return code from an MQI call.

If the application has not been designed to handle failures and perform re-connections manually, it might be necessary to disable auto balancing for those applications.Note: Auto balancing is enabled for any application that is identified as being reconnectable, that is, the application has MQCNO_RECONNECT in its effective connection options. Parent topic: About uniform clusters


Related tasks

Last updated: 2020-10-04