pulsar-admin tool is the administrative CLI for Apache Pulsar. It provides commands to manage and monitor all aspects of a Pulsar cluster.
Usage
Global Options
| Option | Description |
|---|---|
--admin-url | Admin Service URL to connect to |
--auth-plugin | Authentication plugin class name |
--auth-params | Authentication parameters in key:value format |
--request-timeout | Request timeout in seconds (default: 300) |
--tls-allow-insecure | Allow insecure TLS connections |
--tls-trust-cert-path | Path to TLS trust certificates |
--tls-enable-hostname-verification | Enable TLS hostname verification |
--tls-provider | TLS provider (OPENSSL or JDK) |
-h, --help | Display help information |
-v | Display version information |
Available Commands
Cluster Management
clusters
Manage Pulsar clusters.list- List all clustersget- Get cluster configurationcreate- Create a new clusterupdate- Update cluster configurationdelete- Delete a clusterupdate-peer-clusters- Update peer cluster listget-peer-clusters- Get peer clustersget-failure-domain- Get failure domain configurationcreate-failure-domain- Create failure domainupdate-failure-domain- Update failure domaindelete-failure-domain- Delete failure domainlist-failure-domains- List all failure domains
Tenant Management
tenants
Manage Pulsar tenants (formerly called properties).list- List all tenantsget- Get tenant configurationcreate- Create a new tenantupdate- Update tenant configurationdelete- Delete a tenant
Namespace Management
namespaces
Manage Pulsar namespaces.list- List namespaces for a tenanttopics- Get list of topics in a namespacepolicies- Get namespace policiescreate- Create a namespacedelete- Delete a namespaceset-retention- Set retention policyget-retention- Get retention policyset-message-ttl- Set message TTLget-message-ttl- Get message TTLset-backlog-quota- Set backlog quotaget-backlog-quotas- Get backlog quotasset-persistence- Set persistence policiesget-persistence- Get persistence policiesset-replication-clusters- Set replication clustersget-replication-clusters- Get replication clustersset-deduplication- Enable/disable deduplicationset-auto-topic-creation- Configure auto topic creationset-auto-subscription-creation- Configure auto subscription creationunload- Unload a namespaceclear-backlog- Clear backlog
Topic Management
topics
Manage Pulsar topics (persistent and non-persistent).list- List all topics in namespacelist-partitioned-topics- List partitioned topicspermissions- Get topic permissionsgrant-permission- Grant permission to a rolerevoke-permission- Revoke permission from a rolelookup- Lookup topic owner brokerpartitioned-lookup- Lookup partitioned topicbundle-range- Get bundle range of a topicdelete- Delete a topicunload- Unload a topicsubscriptions- List subscriptionsunsubscribe- Delete a subscriptioncreate-subscription- Create a subscriptionstats- Get topic statsstats-internal- Get internal statsinfo-internal- Get internal metadata infopartitioned-stats- Get partitioned topic statsskip- Skip messages for a subscriptionclear-backlog- Clear backlog for a subscriptionexpire-messages- Expire messagesexpire-messages-all-subscriptions- Expire messages for all subscriptionscreate-partitioned-topic- Create partitioned topiccreate- Create non-partitioned topicupdate-partitioned-topic- Update partitioned topicget-partitioned-topic-metadata- Get partitioned topic metadatadelete-partitioned-topic- Delete partitioned topicpeek-messages- Peek messagesexamine-messages- Examine messagesget-message-by-id- Get message by IDreset-cursor- Reset subscription cursorterminate- Terminate topiccompact- Trigger compactioncompaction-status- Get compaction statusoffload- Trigger offloadoffload-status- Get offload statuslast-message-id- Get last message IDget-backlog-quotas- Get backlog quotasset-backlog-quota- Set backlog quotaget-message-ttl- Get message TTLset-message-ttl- Set message TTLget-retention- Get retention policyset-retention- Set retention policy
Broker Management
brokers
Manage Pulsar brokers.list- List active brokersleader-broker- Get leader brokernamespaces- List namespaces owned by brokerupdate-dynamic-config- Update dynamic configurationget-all-dynamic-config- Get all dynamic configslist-dynamic-config- List dynamic config namesget-internal-config- Get internal configurationget-runtime-config- Get runtime configurationhealthcheck- Perform health check
broker-stats
Get broker statistics.Schema Management
schemas
Manage topic schemas.get- Get latest schemaget-all-versions- Get all schema versionsdelete- Delete schemaupload- Upload a new schemaextract- Extract schema definitiontest-compatibility- Test schema compatibility
Functions Management
functions
Manage Pulsar Functions.create- Create a functionupdate- Update a functiondelete- Delete a functionget- Get function infolist- List all functionsstatus- Get function statusstats- Get function statsrestart- Restart function instancestop- Stop function instancestart- Start function instancetrigger- Trigger functionupload- Upload function packagedownload- Download function packagequerystate- Query function stateputstate- Put function state
sources
Manage Pulsar IO sources.sinks
Manage Pulsar IO sinks.Resource Management
resourcegroups
Manage resource groups.resource-quotas
Manage resource quotas for namespaces.BookKeeper Management
bookies
Manage BookKeeper bookies.list-bookies- List all bookiesracks-placement- Get rack placement infoget-bookie-info- Get bookie infodelete-bookie-rack- Delete bookie rack infoset-bookie-rack- Set bookie rack info
Namespace Isolation
ns-isolation-policy
Manage namespace isolation policies.Transaction Management
transactions
Manage transactions.Package Management
packages
Manage function/connector packages.Proxy Statistics
proxy-stats
Get proxy statistics.Examples
Complete Workflow: Create and Configure a Topic
Monitor and Troubleshoot
Configuration
Create a configuration file atconf/client.conf:
Related Commands
- pulsar-client - Produce and consume messages
- pulsar - Run Pulsar components