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 command of the tool

  • 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

  1. broker1.use.org.com:8080
REST
Java
  1. 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
  1. --url broker1.use.org.com:8080
REST

Java
  1. 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

  1. $ pulsar-admin brokers update-dynamic-config brokerShutdownTimeoutMs 100

REST API

POST/admin/v2/brokers/configuration/:configName/:configValue

Java

  1. admin.brokers().updateDynamicConfiguration(configName, configValue);

Fetch a list of all potentially updatable configuration parameters.

pulsar-admin

REST API

GET/admin/v2/brokers/configuration

Java

  1. admin.brokers().getDynamicConfigurationNames();

Fetch a list of all parameters that have been dynamically updated.

pulsar-admin

  1. $ pulsar-admin brokers get-all-dynamic-config

REST API

Java

  1. admin.brokers().getAllDynamicConfigurations();