Configuring Two Message Brokers in a Fail-Over Configuration

Normally, only one Message Broker receives initial messages from a server configuration's transmitters. However, for load-balancing or in a fail-over configuration, you can use two Message Brokers as the "root" Message Broker. The following procedure describes where to install and how to configure these two Message Brokers. One can go on the server machine with the second on a network-near machine or both Message Brokers can be on network-near machines. Both Message Brokers can even be on the same machine if they used different port numbers.

The network-near machine (or machines) will not compete with StarTeam Server for memory and network bandwidth. Since the Message Broker is not especially CPU or memory bound, the system requirements for the second machine can be quite minimal. For example, a 1-CPU Pentium with ~512MB of memory is sufficient; however, 2 CPUs (or a Pentium-HT) and 1GB of memory is ideal. Note that, the Message Broker will crash if it runs out of memory.

To deploy and configure two Message Brokers on separate server machines:

  1. Install two Message Brokers on separate server machines but network-near to the StarTeam Server, and set each to point to the other by adding the line:
    setopt server_names tcp:other_server:5101

    to the STMessageBroker68.ini file, where other_server is the IP address of the "other" Message Broker server machine.

  2. Open the StarTeam configuration's Event Transmitter configuration file (typically MPXEventTransmitter.xml) in a text editor, and change the default client and server profiles to randomly select between the two Message Brokers:
    <server_names>_random, tcp:box1:5101, tcp:box2:5101</server_names>

    where box1 and box2 are the IP addresses of the two Message Broker server machines.

    This setting causes both the MPX Event Transmitter and all local clients to randomly select one of the two Message Brokers. Furthermore, if one of them fails (for example, it faults, is turned off, or disconnected from the network), everyone connected to that Message Broker will fail-over to the other Message Broker. This also allows one box to be taken down for maintenance without bringing all of StarTeamMPX down.

    Remote users should continue to use the MPX profile that points them to the network-nearest Message Broker.