Creating a Native HA queue manager
You need three nodes to create a Native HA queue manager with three instances on Linux. The nodes can be docker containers, virtual machines, or bare-metal servers, although you must use the same type of node for all three instances.
About this task
Each node must initially be able to communicate with the other nodes and start with the same IBM® MQ maintenance level.
You create the three Native HA instances by using the crtmqm command on each node (although the three instances constitute a single queue manager).
In this example, the nodes have the host names alpha, beta, and
gamma. For simplicity, these names are also used as the instance names inside the
group. The group name is datacenter1.
The queue manager is called MYQMGR, and is created with ten primary and ten secondary extents of
32 MB. The -p option is specified to tell the queue manager to start a TCP/IP
listener for channels and clients on port 1414, and start this when an instance is elected to start
as an active.
After you create the three instances, you edit the qm.ini file for each instance to add information that lets them communicate with one another.
Procedure
Results
After the instances have started, the first election takes place to choose the first leader and permanently set the QMId. This first election is special in that it requires all three instances to participate, whereas subsequent elections only require a majority to participate. The leader’s log is replicated in plaintext over the network links to the two other replicas. When one of the two replicas is synchronized with the leader, there is quorum to begin writing to the log.
When the elected leader has quorum, it performs normal queue manager startup and becomes the active queue manager instance and opens for application connections. You can now connect applications and start using commands such as runmqsc to define and alter the settings of the queue manager.