Reputation: 1
We configured Multi-instance queue manager and broker on Linux and started Broker as MQ service.
During Queue manger switchover sometimes the broker processes are not terminated.
Can you Please provide the multi instance queuemanager and broker start and stop scripts for gracefull shutdown/switchover.
We need mq and broker multi instance stop/switchover scripts
Upvotes: -1
Views: 360
Reputation: 244
Maybe nobody will be able to share such a script with you, because the documented approach is to configure multi-instance integration nodes. This releases you from the burden of switching a broker back and force if the Qmgr does. It is available starting with IBM Integration Bus (IIB) V.10 and of course IBM App Connect Enterprise. With IIB V.9 you would need to create a multi-instance broker.
If you really, really want to continue with your current approach to let brokers switch back and force with the help of an MQ service object definition, please note the Qmgr stops such services asynchronously - it will not wait until the broker has actually stopped and it will not monitor if it actually did before the Qmgr ends. Thus, to make sure the broker is shut down, I suggest not to specifiy mqsistop
as the STOPCMD
directly, but let a custom script being invoked. In this script you can implement an escalated approach like this - first invoke
mqsistop -w [timeout]
Decide for a meaningful timeout for this graceful attempt. If that does not stop the broker (check for the response code of mqsistop
in your script), then continue with
mqsistop -w [timeout] --immediate
You even may want to kill processes as a last level of escalation.
If your current problem is, that the way you have set up your broker causes problems if processes run on both servers in parallel, you would also add a custom script for STARTCMD
and add a delay corresponding to the maximum time your custom stop script may take (based on your timeout values).
But still, this concept is a failure when the Qmgr does not just switches but crashes. Then no stop command will be invoked at all.
A solution with inetd
instead of MQ service objects might be feasible. But as this would mean a redesign of your solution, we better stop this discussion and start from the beginning of my answer.
Upvotes: 0