Start and stop a multi-instance queue manager
Start and stop a queue manager configured on Multiplatforms either as a single instance or a multi-instance queue manager.
When you have defined a multi-instance queue manager on a pair of servers, we can run the queue manager on either server, either as a single instance queue manager, or as a multi-instance queue manager.
To run a multi-instance queue manager, start the queue manager on one of the servers using the strmqm -x QM1 command; the -x option permits the instance to failover. It becomes the active instance. Start the standby instance on the other server using the same strmqm -x QM1 command; the -x option permits the instance to start as a standby.
The queue manager is now running with one active instance that is processing all requests, and a standby instance that is ready to take over if the active instance fails. The active instance is granted exclusive access to the queue manager data and logs. The standby waits to be granted exclusive access to the queue manager data and logs. When the standby is granted exclusive access, it becomes the active instance.
We can also manually switch control to the standby instance by issuing the endmqm -s command on the active instance. The endmqm -s command shuts down the active instance without shutting down the standby. The exclusive access lock on the queue manager data and logs is released, and the standby takes over.
We can also start and stop a queue manager configured with multiple instances on different servers as a single instance queue manager. If you start the queue manager without using the -x option on the strmqm command, the instances of the queue manager configured on other machines are prevented from starting as standby instances. If you attempt to start another instance you receive the response that the queue manager instance is not permitted to run as a standby.
If you stop the active instance of a multi-instance queue manager using the endmqm command without the -s option, then the active and standby instances both stop. If you stop the standby instance using the endmqm command with the -x option, then it stops being a standby, and the active instance continues running. We cannot issue endmqm without the -x option on the standby.
Only two queue manager instances can run at the same time; one is the active instance, and the other is a standby instance. If you start two instances at the same time, IBM MQ has no control over which instance becomes the active instance; it is determined by the network file system. The first instance to acquire exclusive access to the queue manager data becomes the active instance.
Note: Before you restart a failed queue manager, we must disconnect the applications from that instance of the queue manager. If we do not, the queue manager might not restart correctly. Parent topic: Multi-instance queue managers