Sun Java System Message Queue 3.7 UR1 Administration Guide

Removing Brokers From a Cluster

The method you use to remove a broker from a cluster depends on whether you originally created the cluster via the command line or by means of a central cluster configuration file.

Removing a Broker Using the Command Line

If you used the imqbrokerd command from the command line to connect the brokers into a cluster, you must stop each of the brokers and then restart them, specifying the new set of cluster members on the command line. The procedure is as follows:

ProcedureTo Remove a Broker From a Cluster Using the Command Line

  1. Stop each broker in the cluster, using the imqcmd command.

  2. Restart the brokers that will remain in the cluster, using the imqbrokerd command’s -cluster option to specify only those remaining brokers.

    For example, suppose you originally created a cluster consisting of brokers A, B, and C by starting each of the three with the command


    imqbrokerd -cluster A,B,
    C
    

    To remove broker A from the cluster, restart brokers B and C with the command


    imqbrokerd -cluster B,C
    

Removing a Broker Using a Cluster Configuration File

If you originally created a cluster by specifying its member brokers with the imq.cluster.brokerlist property in a central cluster configuration file, it isn’t necessary to stop the brokers in order to remove one of them. Instead, you can simply edit the configuration file to exclude the broker you want to remove, force the remaining cluster members to reload the cluster configuration, and reconfigure the excluded broker so that it no longer points to the same cluster configuration file. Here is the procedure:

ProcedureTo Remove a Broker From a Cluster Using a Cluster Configuration File

  1. Edit the cluster configuration file to remove the excluded broker from the list specified for the imq.cluster.brokerlist property.

  2. Issue the following command to each broker remaining in the cluster:


    imqcmd reload cls

    This forces the broker to reload the cluster configuration.

  3. Stop the broker you’re removing from the cluster.

  4. Edit that broker’s config.properties file, removing or specifying a different value for its imq.cluster.url property.