Removing a Broker from a Territory
The BrokerAdminClient.leaveTerritory method lets you remove the Broker to which your BrokerAdminClient is connected from its territory. When a Broker leaves a territory, communication must take place between the Broker being removed and the other Brokers in the territory.
You must provide the following arguments to this method:
The number of milliseconds to wait for the operation to complete. You can specify -1 to indicate you do not wish the operation to be subject to a time-out.
An indication of whether or not the operation should be forced to complete, even if communication with the other
Brokers in the territory exceeds the time limit.
You can use the BrokerAdminClient.removeBrokerFromTerritory method to remove a Broker from a territory. This function will not wait for the communication between the other Brokers in the territory to complete, but returns as soon as the removal process is initiated.
You must provide the following arguments to this method:
The name of the
Broker to be removed from the territory.
The name of the
Broker host where the
Broker is executing.