Managing Brokers
- An HTTP server exposing a REST interface administration and lookup.
A dispatcher that handles all Pulsar message transfers. can be managed via:
- The
brokers
method of the PulsarAdmin object in the In addition to being configurable when you start them up, brokers can also be dynamically configured.
Fetch all available active brokers that are serving traffic.
pulsar-admin
broker1.use.org.com:8080
REST
Java
admin.brokers().getActiveBrokers(clusterName)
list of namespaces owned by a given broker
It finds all namespaces which are owned and served by a given broker.
CLI
--url broker1.use.org.com:8080
REST
Java
admin.brokers().getOwnedNamespaces(cluster,brokerUrl);
One way to configure a Pulsar is to supply a configuration when the broker is .
But since all broker configuration in Pulsar is stored in ZooKeeper, configuration values can also be dynamically updated while the broker is running. When you update broker configuration dynamically, ZooKeeper will notify the broker of the change and the broker will then override any existing configuration values.
- The
brokers
command for the tool has a variety of subcommands that enable you to manipulate a broker's configuration dynamically, enabling you to update config values and more. - In the Pulsar admin API, dynamic configuration is managed through the
/admin/v2/brokers/configuration
endpoint.
pulsar-admin
$ pulsar-admin brokers update-dynamic-config brokerShutdownTimeoutMs 100
REST API
POST/admin/v2/brokers/configuration/:configName/:configValue
Java
admin.brokers().updateDynamicConfiguration(configName, configValue);
Fetch a list of all potentially updatable configuration parameters.
pulsar-admin
REST API
GET/admin/v2/brokers/configuration
Java
admin.brokers().getDynamicConfigurationNames();
Fetch a list of all parameters that have been dynamically updated.
pulsar-admin
$ pulsar-admin brokers get-all-dynamic-config
REST API
Java
admin.brokers().getAllDynamicConfigurations();