LinuxCommandLibrary

pulsar-admin

Apache Pulsar cluster administration tool

TLDR

List tenants
$ pulsar-admin tenants list
copy
List namespaces in tenant
$ pulsar-admin namespaces list [tenant]
copy
List topics in namespace
$ pulsar-admin topics list [tenant/namespace]
copy
Create a topic
$ pulsar-admin topics create persistent://[tenant]/[namespace]/[topic]
copy
Get topic stats
$ pulsar-admin topics stats [topic]
copy
Check broker status
$ pulsar-admin brokers list [cluster]
copy
Create a tenant
$ pulsar-admin tenants create [tenant]
copy
Set namespace retention policy
$ pulsar-admin namespaces set-retention [tenant/namespace] --size [10G] --time [3d]
copy

SYNOPSIS

pulsar-admin command [options]

DESCRIPTION

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.

PARAMETERS

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

ADMIN COMMANDS

tenants list|create|delete|get|update

Manage tenants (multi-tenancy).
namespaces list|create|delete|policies
Manage namespaces.
topics list|create|delete|stats|subscriptions
Manage topics and subscriptions.
brokers list|leader|namespaces
Broker information.
clusters list|create|delete|update
Cluster management.
functions create|delete|list|status
Manage Pulsar Functions.
sources/sinks create|delete|list
Manage IO connectors.

CAVEATS

Requires proper authentication configuration for secured clusters. Topic creation may be automatic depending on broker settings. Namespace policies affect all topics within. Functions require function worker to be enabled.

HISTORY

Apache Pulsar was originally developed at Yahoo! and open-sourced in 2016. It became an Apache top-level project in 2018. Designed for multi-tenancy and geo-replication, Pulsar separates storage (BookKeeper) from serving (brokers). It offers features like topic compaction, tiered storage, and built-in schema registry. StreamNative provides commercial support.

SEE ALSO

nats(1), rabbitmqctl(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard