Linux command
pulsar-admin 命令
文件
复制后可按需替换文件名、目录或参数。
常用示例
List tenants
pulsar-admin tenants list
List namespaces in tenant
pulsar-admin namespaces list [tenant]
List topics in namespace
pulsar-admin topics list [tenant/namespace]
Create a topic
pulsar-admin topics create persistent://[tenant]/[namespace]/[topic]
Get topic stats
pulsar-admin topics stats [topic]
Check broker status
pulsar-admin brokers list [cluster]
Create a tenant
pulsar-admin tenants create [tenant]
Set namespace retention policy
pulsar-admin namespaces set-retention [tenant/namespace] --size [10G] --time [3d]
说明
pulsar-admin manages Apache Pulsar clusters, handling tenants, namespaces, topics, and cluster configuration. It provides administrative control over the entire Pulsar infrastructure. Pulsar's multi-tenancy model organizes resources: clusters contain tenants, tenants contain namespaces, namespaces contain topics. Each level has configurable policies. Topics use the format persistent://tenant/namespace/topic (or non-persistent://). Subscriptions define how consumers receive messages: exclusive, shared, failover, or key_shared. pulsar-admin topics stats shows message rates, storage size, subscriptions, and producer/consumer connections. This helps monitor topic health. Pulsar Functions enable lightweight stream processing directly on the broker. Sources and sinks connect external systems for data ingestion and export.
参数
- --admin-url _url_
- Pulsar admin service URL.
- --auth-plugin _class_
- Authentication plugin class.
- --auth-params _params_
- Authentication parameters.
- --tls-trust-certs-filepath _path_
- Path to TLS trust certificates file.
FAQ
What is the pulsar-admin command used for?
pulsar-admin manages Apache Pulsar clusters, handling tenants, namespaces, topics, and cluster configuration. It provides administrative control over the entire Pulsar infrastructure. Pulsar's multi-tenancy model organizes resources: clusters contain tenants, tenants contain namespaces, namespaces contain topics. Each level has configurable policies. Topics use the format persistent://tenant/namespace/topic (or non-persistent://). Subscriptions define how consumers receive messages: exclusive, shared, failover, or key_shared. pulsar-admin topics stats shows message rates, storage size, subscriptions, and producer/consumer connections. This helps monitor topic health. Pulsar Functions enable lightweight stream processing directly on the broker. Sources and sinks connect external systems for data ingestion and export.
How do I run a basic pulsar-admin example?
Run `pulsar-admin tenants list` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does --admin-url _url_ do in pulsar-admin?
Pulsar admin service URL.