Overview
Brokers are the servers that handle message routing and storage in Pulsar. The Brokers API provides endpoints to monitor broker health, manage configurations, and view broker-level statistics. Base Path:/admin/v2/brokers
List Active Brokers
Get the list of all active broker IDs in a cluster.Path Parameters
The cluster name
Response
Set of active broker IDs
Example
Response Example
List Active Brokers (Local Cluster)
Get active brokers in the local cluster without specifying cluster name.Example
Get Leader Broker
Retrieve information about the current leader broker.Response
HTTP service URL of the leader broker
The broker ID of the leader
Example
Response Example
Get Owned Namespaces
Get the list of namespaces owned by a specific broker.Path Parameters
The cluster name
The broker ID (e.g., broker-1.example.com:8080)
Response
Map of namespace names to ownership status
Example
Response Example
Dynamic Configuration
Update Dynamic Configuration
Update a dynamic service configuration parameter.Path Parameters
The configuration parameter name
The new value for the parameter
Example
Response Codes
| Code | Description |
|---|---|
| 204 | Configuration updated successfully |
| 403 | Don’t have super-user privileges |
| 404 | Configuration not found |
| 412 | Invalid configuration value |
Only dynamic configurations can be updated at runtime. Static configurations require a broker restart.
Get All Dynamic Configurations
Retrieve all runtime configurations.Example
Get Dynamic Configuration Names
Get the list of all dynamic configuration parameter names.Example
Delete Dynamic Configuration
Reset a dynamic configuration to its default value.Example
Internal Configuration
Get Internal Configuration
Retrieve internal configuration data for the broker.Response
ZooKeeper connection string
Configuration store connection string
BookKeeper ledgers root path
Example
Health Check
Health Check
Check broker health status.Response Codes
| Code | Description |
|---|---|
| 200 | Broker is healthy |
| 307 | Temporary redirect to another broker |
| 500 | Broker is unhealthy |
Example
Version
Get Pulsar Version
Get the Pulsar version running on the broker.Response
Pulsar version string
Example
Response Example
Common Dynamic Configurations
Here are some commonly used dynamic configuration parameters:Performance Tuning
- maxConcurrentLookupRequest: Maximum concurrent topic lookup requests
- maxConcurrentTopicLoadRequest: Maximum concurrent topic load requests
- maxMessageSize: Maximum message size in bytes
- maxPublishRatePerTopicInMessages: Max publish rate per topic
- maxPublishRatePerTopicInBytes: Max publish rate per topic in bytes
Resource Limits
- maxUnackedMessagesPerConsumer: Max unacked messages per consumer
- maxUnackedMessagesPerSubscription: Max unacked messages per subscription
- maxSubscriptionsPerTopic: Max subscriptions per topic
- maxProducersPerTopic: Max producers per topic
- maxConsumersPerTopic: Max consumers per topic
Backlog Management
- backlogQuotaDefaultLimitGB: Default backlog quota in GB
- backlogQuotaDefaultRetentionPolicy: Default retention policy (producer_request_hold, producer_exception, consumer_backlog_eviction)
- backlogQuotaCheckIntervalInSeconds: How often to check backlog quotas
Example - Update Multiple Configurations
Best Practices
Monitoring
- Regularly check broker health endpoints
- Monitor owned namespaces for balanced distribution
- Track dynamic configuration changes
- Set up alerts for broker failures
Configuration Management
- Test configuration changes in staging first
- Document all dynamic configuration updates
- Use version control for configuration changes
- Monitor impact of configuration changes
Performance
- Tune concurrent request limits based on load
- Adjust resource limits to prevent overload
- Configure appropriate backlog policies
- Monitor and adjust based on metrics
High Availability
- Ensure multiple brokers per cluster
- Monitor leader broker status
- Test failover procedures
- Balance namespace ownership across brokers
Error Handling
403 - Permission Denied
403 - Permission Denied
You don’t have super-user privileges.Solution: Ensure you’re authenticated with proper credentials.
404 - Configuration Not Found
404 - Configuration Not Found
The specified configuration parameter doesn’t exist.Solution: Check the list of available dynamic configurations.
412 - Invalid Configuration Value
412 - Invalid Configuration Value
The provided value is not valid for the configuration parameter.Solution: Check the parameter’s type and valid range.
500 - Broker Unhealthy
500 - Broker Unhealthy
The broker failed its health check.Solution: Check broker logs and system resources.
Related Resources
Clusters API
Manage cluster configurations
Namespaces API
View namespace ownership and policies