How you create a multi-instance
broker using an existing multi-instance queue manager for a high availability
configuration.
Before you start:Create
the WebSphere® MQ multi-instance queue
manager.
The queue manager must be created with the “-a” or “-ar” flag
on crtmqm, specifying a domain group that WMQ can
use for securing shared files. If you have the option, use the “-ar” flag.
The “-ar” flag is available when using WebSphere MQ Version 7.1.
For
more information, see
Creating the WebSphere MQ multi-instance queue manager.
You do not require a Windows installation on the domain
controllers to use these instructions. To use an existing queue manager
to create a multi-instance broker:
- Create the shared directories that you require for the
multi-instance broker. For more information about shared directories,
see Creating the shared directories
- Define the following user and groups:
- A domain group which is a member of the local mqbrkrs on
both systems. For example, WMB\Domain mqbrkrs
- A domain user which is a member of the Domain mqbrkrs
group. This ID is used for running the broker. For example, WMB\mqsiuser.
- A domain user which is a member of the Domain mqbrkrs
group and a member of the local Administrators group on both machines.
This ID is used for creating the broker. It can be the same as the
previous ID, but it is not necessary
to run the broker as an Administrator. For example, WMB\mqsiuser-admin.
- Create a folder for the broker shared files on the file
server, c:\mqsishare. Update the security permissions
of the folder, using the change
permissions section of the Advanced Security
Settings panel:
- Clear "include inheritable permissions from this objects
parent".
- Remove all of the existing entries.
- Add "Domain mqbrkrs" with "Full Control". If this folder
is also being used for multi-instance queue manager, then the domain
group used to secure the queue manager must also be added with “Full
Control” as well. Use the advanced sharing options to share this
folder.
- Remove the default "Everyone" user from the list.
- Add "Domain mqbrkrs" with "Full Control".
- Optional: If this share is also being used for the multi-instance
queue manager, then the domain group used to secure the queue manager
must also be added with “Full Control” as well.
- As user mqsiuser-admin, open a command console with elevated
privileges. To open a command console with elevated privileges, use
the mqsicommandconsole command.
For more information, see mqsicommandconsole command
- Create a multi-instance broker called MB1 on
client node A. Do this by using the following
command:
mqsicreatebroker MIMB1 -i "WMB\mqsiuser" -a <password> –q MIQM1 –e \\MyServer\\mqsishare -B "WMB\Domain mqbrkrs"
Where MIQM1 is the name of the existing
multi-instance queue manager created with the -a or -ar flags
as mentioned in the above code. Replace <password> with
the mqsiuser-admin password. If you want to start the multi-instance
broker as a WebSphere MQ service, you
can specify -d defined on the mqsicreatebroker command.
You must ensure that the SharedLocation exists,
and that your user ID has access to the shared location before you
run this command.
See mqsicreatebroker command for
further information.
- Add the details of broker MB1 onto client
node B. Do this by using the following
command:
mqsiaddbrokerinstance MIMB1 -i "WMB\mqsiuser" -a <password> –e \\MyServer\\mqsishare
See mqsiaddbrokerinstance command for further information.Note that
the preceding example is for a UNIX system.
- Start queue manager MIQM1 so that it is
active on client node A.
- Start broker MB1 on client node A. Do this by using the following command:
mqsistart MB1
- Start broker MB1 on client node B. Observe that broker MB1 is running in
standby mode against the standby queue managerQM1.
Do this by using the following command:
mqsilist
- Optional: Ensure that broker MB1 works
as follows:
- Stop broker MB1 and queue manager QM1 on
client node A. Observe on client node B that
broker MB1 and queue manager QM1 change
from standby to active mode.
- Restart queue manager QM1 and broker MB1 on
client node A. Observe on client node B that
queue manager QM1 and broker MB1 return
to standby mode.
You have created a multi-instance broker using an existing
multi-instance queue manager. When broker MB1 and
queue manager QM1 stop on client node A,
the same broker and queue manager on client node B become
active, and return to standby when client node A becomes
active again.