[IBM Cloud Pak for Integration]

Ending Native HA queue managers

For IBM® MQ in containers, you can use the endmqm command to end an active or a replica queue manager that is part of a Native HA group.

About this task

Note: This information applies only to container environments.

The procedure for stopping a queue manager that is part of a Native HA group depends on whether it is an active or a replica instance. When you end either type of instance, a check is made to ensure that ending the instance does not break the quorum of the Native HA group. If the quorum would be broken, the endmqm command fails.

When you issue an endmqm command, the other instances in the group are warned that this is happening, so that they do not report errors when the connection breaks.

If an active instance loses quorum because of the ending or disconnection of too many replica instances, the active instance waits for a configurable amount of time before ending completely. This allows a period of time to shut down processing gracefully, rather than applications just having their connections broken. This timeout value can be specified by the QuorumConnectivityTimeout attribute in the NativeHALocalInstance stanza of the qm.ini file. The default value is 0 seconds.

Procedure

  • To end the active instance of a queue manager, issue the following command on the node where the active instance is running:
    endmqm -s QMgrName
    • Specify the -r option to help client applications to reconnect to another instance.
    • If this instance is not the active instance in the Native HA group then the command fails.
    • If ending this active instance would cause the group quorum to fail then the command fails. (If other instances end or become unavailable at the same time as you run this command, the quorum check might not detect this, the Native HA group ends and can only be restarted when enough instances are available.)
    When the active queue manager ends, one of the replica instances takes over the active role. You cannot specify which replica takes over, this is determined by negotiation within the group and depends on which has the most up-to-date transaction logs.
  • To end a replica instance of a queue manager, issue the following command:
    endmqm -x QMgrName
    • If this instance is the active instance then the command fails.
    • If ending this replica instance would cause the group quorum to fail then the command fails. (If other instances end or become unavailable at the same time as you run this command, the quorum check might not detect this, the Native HA group ends and can only be restarted when enough instances are available.)
    Note: You can also use the -c, -i, -p, or -w switches with the endmqm command on Native HA instances, regardless of which role they are in. The queue manager instance ends, ignoring the effect that has on the group quorum. Information is still shared with the other instances in the group, however. You can use these switches together with the -s for the active instance. You cannot use these switches together with the -x switch for replica instances.