Pulsar admin CLI
The pulsar-admin
tool enables you to manage Pulsar installations, including clusters, brokers, namespaces, tenants, and more.
Usage
$ pulsar-admin command
Commands
broker-stats
brokers
clusters
functions
namespaces
ns-isolation-policy
sink
source
topics
tenants
resource-quotas
schemas
broker-stats
β
Operations to collect broker statistics
$ pulsar-admin broker-stats subcommand
Subcommands
allocator-stats
topics(destinations)
mbeans
monitoring-metrics
load-report
allocator-stats
β
Dump allocator stats
Usage
$ pulsar-admin broker-stats allocator-stats allocator-name
topics(destinations)
β
Dump topic stats
Usage
$ pulsar-admin broker-stats topics options
Options
Flag | Description | Default |
---|---|---|
-i , --indent | Indent JSON output | false |
mbeans
β
Dump Mbean stats
Usage
$ pulsar-admin broker-stats mbeans options
Options
Flag | Description | Default |
---|---|---|
-i , --indent | Indent JSON output | false |
monitoring-metrics
β
Dump metrics for monitoring
Usage
$ pulsar-admin broker-stats monitoring-metrics options
Options
Flag | Description | Default |
---|---|---|
-i , --indent | Indent JSON output | false |
load-report
β
Dump broker load-report
Usage
$ pulsar-admin broker-stats load-report
brokers
β
Operations about brokers
$ pulsar-admin brokers subcommand
Subcommands
list
namespaces
update-dynamic-config
list-dynamic-config
get-all-dynamic-config
get-internal-config
get-runtime-config
healthcheck
list
β
List active brokers of the cluster
Usage
$ pulsar-admin brokers list cluster-name
namespaces
β
List namespaces owned by the broker
Usage
$ pulsar-admin brokers namespaces cluster-name options
Options
Flag | Description | Default |
---|---|---|
--url | The URL for the broker |
update-dynamic-config
β
Update a broker's dynamic service configuration
Usage
$ pulsar-admin brokers update-dynamic-config options
Options
Flag | Description | Default |
---|---|---|
--config | Service configuration parameter name | |
--value | Value for the configuration parameter value specified using the --config flag |
list-dynamic-config
β
Get list of updatable configuration name
Usage
$ pulsar-admin brokers list-dynamic-config
get-all-dynamic-config
β
Get all overridden dynamic-configuration values
Usage
$ pulsar-admin brokers get-all-dynamic-config
get-internal-config
β
Get internal configuration information
Usage
$ pulsar-admin brokers get-internal-config
get-runtime-config
β
Get runtime configuration values
Usage
$ pulsar-admin brokers get-runtime-config
healthcheck
β
Run a health check against the broker
Usage
$ pulsar-admin brokers healthcheck
clusters
β
Operations about clusters
Usage
$ pulsar-admin clusters subcommand
Subcommands
get
create
update
delete
list
update-peer-clusters
get-peer-clusters
get-failure-domain
create-failure-domain
update-failure-domain
delete-failure-domain
list-failure-domains
get
β
Get the configuration data for the specified cluster
Usage
$ pulsar-admin clusters get cluster-name
create
β
Provisions a new cluster. This operation requires Pulsar super-user privileges.
Usage
$ pulsar-admin clusters create cluster-name options
Options
Flag | Description | Default |
---|---|---|
--broker-url | The URL for the broker service. | |
--broker-url-secure | The broker service URL for a secure connection | |
--url | service-url | |
--url-secure | service-url for secure connection |
update
β
Update the configuration for a cluster
Usage
$ pulsar-admin clusters update cluster-name options
Options
Flag | Description | Default |
---|---|---|
--broker-url | The URL for the broker service. | |
--broker-url-secure | The broker service URL for a secure connection | |
--url | service-url | |
--url-secure | service-url for secure connection |
delete
β
Deletes an existing cluster
Usage
$ pulsar-admin clusters delete cluster-name
list
β
List the existing clusters
Usage
$ pulsar-admin clusters list
update-peer-clusters
β
Update peer cluster names
Usage
$ pulsar-admin clusters update-peer-clusters cluster-name options
Options
Flag | Description | Default |
---|---|---|
--peer-clusters | Comma separated peer cluster names (Pass empty string "" to delete list) |
get-peer-clusters
β
Get list of peer clusters
Usage
$ pulsar-admin clusters get-peer-clusters
get-failure-domain
β
Get the configuration brokers of a failure domain
Usage
$ pulsar-admin clusters get-failure-domain cluster-name options
Options
Flag | Description | Default |
---|---|---|
--domain-name | The failure domain name, which is a logical domain under a Pulsar cluster |
create-failure-domain
β
Create a new failure domain for a cluster (updates it if already created)
Usage
$ pulsar-admin clusters create-failure-domain cluster-name options
Options
Flag | Description | Default |
---|---|---|
--broker-list | Comma separated broker list | |
--domain-name | The failure domain name, which is a logical domain under a Pulsar cluster |
update-failure-domain
β
Update failure domain for a cluster (creates a new one if not exist)
Usage
$ pulsar-admin clusters update-failure-domain cluster-name options
Options
Flag | Description | Default |
---|---|---|
--broker-list | Comma separated broker list | |
--domain-name | The failure domain name, which is a logical domain under a Pulsar cluster |
delete-failure-domain
β
Delete an existing failure domain
Usage
$ pulsar-admin clusters delete-failure-domain cluster-name options
Options
Flag | Description | Default |
---|---|---|
--domain-name | The failure domain name, which is a logical domain under a Pulsar cluster |
list-failure-domains
β
List the existing failure domains for a cluster
Usage
$ pulsar-admin clusters list-failure-domains cluster-name
functions
β
A command-line interface for Pulsar Functions
Usage
$ pulsar-admin functions subcommand
Subcommands
localrun
create
delete
update
get
getstatus
list
querystate
trigger
localrun
β
Run a Pulsar Function locally
Usage
$ pulsar-admin functions localrun options
Options
Flag | Description | Default |
---|---|---|
--cpu | The CPU to allocate to each function instance (in number of cores) | |
--ram | The RAM to allocate to each function instance (in bytes) | |
--disk | The disk space to allocate to each function instance (in bytes) | |
--auto-ack | Let the functions framework manage acking | |
--subs-name | Pulsar source subscription name if user wants a specific subscription-name for input-topic consumer | |
--broker-service-url | The URL of the Pulsar broker | |
--classname | The name of the functionβs class | |
--custom-serde-inputs | A map of the input topic to SerDe name | |
--custom-schema-inputs | A map of the input topic to Schema class name | |
--client-auth-params | Client Authentication Params | |
--function-config-file | The path of the YAML config file used to configure the function | |
--hostname-verification-enabled | Enable Hostname verification | |
--instance-id-offset | Instance ids will be assigned starting from this offset | |
--inputs | The input topics for the function (as a comma-separated list if more than one topic is desired) | |
--log-topic | The topic to which logs from this function are published | |
--jar | A path to the JAR file for the function (if the function is written in Java) | |
--name | The name of the function | |
--namespace | The functionβs namespace | |
--output | The name of the topic to which the function publishes its output (if any) | |
--output-serde-classname | The SerDe class used for the functionβs output | |
--parallelism | The functionβs parallelism factor, i.e. the number of instances of the function to run | 1 |
--processing-guarantees | The processing guarantees applied to the function. Can be one of: ATLEAST_ONCE, ATMOST_ONCE, or EFFECTIVELY_ONCE | ATLEAST_ONCE |
--py | The path of the Python file containing the functionβs processing logic (if the function is written in Python) | |
--schema-type | Schema Type to be used for storing output messages | |
--sliding-interval-count | Number of messages after which the window ends | |
--sliding-interval-duration-ms | The time duration after which the window slides | |
--state-storage-service-url | The service URL for the functionβs state storage (if the function uses a storage system different from the Apache BookKeeper cluster used by Pulsar). This service URL must be added manually when the Pulsar Function runs locally. | |
--tenant | The functionβs tenant | |
--topics-pattern | The topic pattern to consume from list of topics under a namespace that match the pattern | |
--user-config | A user-supplied config value, set as a key/value pair. You can set multiple user config values. | |
--window-length-count | The number of messages per window. | |
--window-length-duration-ms | The time duration of the window in milliseconds. |
create
β
Creates a new Pulsar Function on the target infrastructure
Usage
$ pulsar-admin functions create options
Options
Flag | Description | Default |
---|---|---|
--cpu | The CPU to allocate to each function instance (in number of cores) | |
--ram | The RAM to allocate to each function instance (in bytes) | |
--disk | The disk space to allocate to each function instance (in bytes) | |
--auto-ack | Let the functions framework manage acking | |
--subs-name | Pulsar source subscription name if user wants a specific subscription-name for input-topic consumer | |
--classname | The name of the functionβs class | |
--custom-serde-inputs | A map of the input topic to SerDe name | |
--custom-schema-inputs | A map of the input topic to Schema class name | |
--function-config-file | The path of the YAML config file used to configure the function | |
--inputs | The input topics for the function (as a comma-separated list if more than one topic is desired) | |
--log-topic | The topic to which logs from this function are published | |
--jar | A path to the JAR file for the function (if the function is written in Java) | |
--name | The name of the function | |
--namespace | The functionβs namespace | |
--output | The name of the topic to which the function publishes its output (if any) | |
--output-serde-classname | The SerDe class used for the functionβs output | |
--parallelism | The functionβs parallelism factor, i.e. the number of instances of the function to run | 1 |
--processing-guarantees | The processing guarantees applied to the function. Can be one of: ATLEAST_ONCE, ATMOST_ONCE, or EFFECTIVELY_ONCE | ATLEAST_ONCE |
--py | The path of the Python file containing the functionβs processing logic (if the function is written in Python) | |
--schema-type | Schema Type to be used for storing output messages | |
--sliding-interval-count | Number of messages after which the window ends | |
--sliding-interval-duration-ms | The time duration after which the window slides | |
--tenant | The functionβs tenant | |
--topics-pattern | The topic pattern to consume from list of topics under a namespace that match the pattern | |
--user-config | A user-supplied config value, set as a key/value pair. You can set multiple user config values. | |
--window-length-count | The number of messages per window. | |
--window-length-duration-ms | The time duration of the window in milliseconds. |
delete
β
Deletes an existing Pulsar Function
Usage
$ pulsar-admin functions delete options
Options
Flag | Description | Default |
---|---|---|
--name | The name of the function to delete | |
--namespace | The namespace of the function to delete | |
--tenant | The tenant of the function to delete |
update
β
Updates an existing Pulsar Function
Usage
$ pulsar-admin functions update options
Options
Flag | Description | Default |
---|---|---|
--cpu | The CPU to allocate to each function instance (in number of cores) | |
--ram | The RAM to allocate to each function instance (in bytes) | |
--disk | The disk space to allocate to each function instance (in bytes) | |
--auto-ack | Let the functions framework manage acking | |
--subs-name | Pulsar source subscription name if user wants a specific subscription-name for input-topic consumer | |
--classname | The name of the functionβs class | |
--custom-serde-inputs | A map of the input topic to SerDe name | |
--custom-schema-inputs | A map of the input topic to Schema class name | |
--function-config-file | The path of the YAML config file used to configure the function | |
--inputs | The input topics for the function (as a comma-separated list if more than one topic is desired) | |
--log-topic | The topic to which logs from this function are published | |
--jar | A path to the JAR file for the function (if the function is written in Java) | |
--name | The name of the function | |
--namespace | The functionβs namespace | |
--output | The name of the topic to which the function publishes its output (if any) | |
--output-serde-classname | The SerDe class used for the functionβs output | |
--parallelism | The functionβs parallelism factor, i.e. the number of instances of the function to run | 1 |
--processing-guarantees | The processing guarantees applied to the function. Can be one of: ATLEAST_ONCE, ATMOST_ONCE, or EFFECTIVELY_ONCE | ATLEAST_ONCE |
--py | The path of the Python file containing the functionβs processing logic (if the function is written in Python) | |
--schema-type | Schema Type to be used for storing output messages | |
--sliding-interval-count | Number of messages after which the window ends | |
--sliding-interval-duration-ms | The time duration after which the window slides | |
--tenant | The functionβs tenant | |
--topics-pattern | The topic pattern to consume from list of topics under a namespace that match the pattern | |
--user-config | A user-supplied config value, set as a key/value pair. You can set multiple user config values. | |
--window-length-count | The number of messages per window. | |
--window-length-duration-ms | The time duration of the window in milliseconds. |
get
β
Fetch information about an existing Pulsar Function
Usage
$ pulsar-admin functions get options
Options
Flag | Description | Default |
---|---|---|
--name | The name of the function | |
--namespace | The namespace of the function | |
--tenant | The tenant of the function |
restart
β
Restarts either all instances or one particular instance of a function
Usage
$ pulsar-admin functions restart options
Options
Flag | Description | Default |
---|---|---|
--name | The name of the function | |
--namespace | The namespace of the function | |
--tenant | The tenant of the function | |
--instance-id | The function instanceId; restart all instances if instance-id is not provided |
stop
β
Temporary stops function instance. (If worker restarts then it reassigns and starts functiona again)
Usage
$ pulsar-admin functions stop options
Options
Flag | Description | Default |
---|---|---|
--name | The name of the function | |
--namespace | The namespace of the function | |
--tenant | The tenant of the function | |
--instance-id | The function instanceId; stop all instances if instance-id is not provided |
getstatus
β
Get the status of an existing Pulsar Function
Usage
$ pulsar-admin functions getstatus options
Options
Flag | Description | Default |
---|---|---|
--name | The name of the function | |
--namespace | The namespace of the function | |
--tenant | The tenant of the function | |
--instance-id | The function instanceId; get status of all instances if instance-id is not provided |
list
β
List all Pulsar Functions for a specific tenant and namespace
Usage
$ pulsar-admin functions list options
Options
Flag | Description | Default |
---|---|---|
--namespace | The namespace of the function | |
--tenant | The tenant of the function |
querystate
β
Retrieve the current state of a Pulsar Function by key
Usage
$ pulsar-admin functions querystate options
Options
Flag | Description | Default |
---|---|---|
-k , --key | The key for the state you want to fetch | |
--name | The name of the function whose state you want to query | |
--namespace | The namespace of the function whose state you want to query | |
--tenant | The tenant of the function whose state you want to query | |
-u , --storage-service-url | The service URL for the functionβs state storage (if the function uses a storage system different from the Apache BookKeeper cluster used by Pulsar) | |
-w , --watch | If set, watching for state changes is enabled | false |
trigger
β
Triggers the specified Pulsar Function with a supplied value or file data
Usage
$ pulsar-admin functions trigger options
Options
Flag | Description | Default |
---|---|---|
--name | The name of the Pulsar Function to trigger | |
--namespace | The namespace of the Pulsar Function to trigger | |
--tenant | The tenant of the Pulsar Function to trigger | |
--trigger-file | The path to the file containing the data with which the Pulsar Function is to be triggered | |
--trigger-value | The value with which the Pulsar Function is to be triggered |
namespaces
β
Operations for managing namespaces
$ pulsar-admin namespaces subcommand
Subcommands
list
topics
policies
create
delete
set-deduplication
permissions
grant-permission
revoke-permission
grant-subscription-permission
revoke-subscription-permission
set-clusters
get-clusters
get-backlog-quotas
set-backlog-quota
remove-backlog-quota
get-persistence
set-persistence
get-message-ttl
set-message-ttl
get-anti-affinity-group
set-anti-affinity-group
get-anti-affinity-namespaces
delete-anti-affinity-group
get-retention
set-retention
unload
split-bundle
set-dispatch-rate
get-dispatch-rate
set-subscribe-rate
get-subscribe-rate
set-subscription-dispatch-rate
get-subscription-dispatch-rate
clear-backlog
unsubscribe
set-encryption-required
set-subscription-auth-mode
get-max-producers-per-topic
set-max-producers-per-topic
get-max-consumers-per-topic
set-max-consumers-per-topic
get-max-consumers-per-subscription
set-max-consumers-per-subscription
get-compaction-threshold
set-compaction-threshold
get-offload-threshold
set-offload-threshold
get-offload-deletion-lag
set-offload-deletion-lag
clear-offload-deletion-lag
get-schema-autoupdate-strategy
set-schema-autoupdate-strategy
list
β
Get the namespaces for a tenant
Usage
$ pulsar-admin namespaces list tenant-name
topics
β
Get the list of topics for a namespace
Usage
$ pulsar-admin namespaces topics tenant/namespace
policies
β
Get the configuration policies of a namespace
Usage
$ pulsar-admin namespaces policies tenant/namespace
create
β
Create a new namespace
Usage
$ pulsar-admin namespaces create tenant/namespace options
Options
Flag | Description | Default |
---|---|---|
-b , --bundles | The number of bundles to activate | 0 |
-c , --clusters | List of clusters this namespace will be assigned |
delete
β
Deletes a namespace. The namespace needs to be empty
Usage
$ pulsar-admin namespaces delete tenant/namespace
set-deduplication
β
Enable or disable message deduplication on a namespace
Usage
$ pulsar-admin namespaces set-deduplication tenant/namespace options
Options
Flag | Description | Default |
---|---|---|
--enable , -e | Enable message deduplication on the specified namespace | false |
--disable , -d | Disable message deduplication on the specified namespace | false |
permissions
β
Get the permissions on a namespace
Usage
$ pulsar-admin namespaces permissions tenant/namespace
grant-permission
β
Grant permissions on a namespace
Usage
$ pulsar-admin namespaces grant-permission tenant/namespace options
Options
Flag | Description | Default |
---|---|---|
--actions | Actions to be granted (produce or consume ) | |
--role | The client role to which to grant the permissions |
revoke-permission
β
Revoke permissions on a namespace
Usage
$ pulsar-admin namespaces revoke-permission tenant/namespace options
Options
Flag | Description | Default |
---|---|---|
--role | The client role to which to revoke the permissions |
grant-subscription-permission
β
Grant permissions to access subscription admin-api
Usage
$ pulsar-admin namespaces grant-subscription-permission tenant/namespace options
Options
Flag | Description | Default |
---|---|---|
--roles | The client roles to which to grant the permissions (comma separated roles) | |
--subscription | The subscription name for which permission will be granted to roles |
revoke-subscription-permission
β
Revoke permissions to access subscription admin-api
Usage
$ pulsar-admin namespaces revoke-subscription-permission tenant/namespace options
Options
Flag | Description | Default |
---|---|---|
--role | The client role to which to revoke the permissions | |
--subscription | The subscription name for which permission will be revoked to roles |
set-clusters
β
Set replication clusters for a namespace
Usage
$ pulsar-admin namespaces set-clusters tenant/namespace options
Options
Flag | Description | Default |
---|---|---|
-c , --clusters | Replication clusters ID list (comma-separated values) |
get-clusters
β
Get replication clusters for a namespace
Usage
$ pulsar-admin namespaces get-clusters tenant/namespace
get-backlog-quotas
β
Get the backlog quota policies for a namespace
Usage
$ pulsar-admin namespaces get-backlog-quotas tenant/namespace
set-backlog-quota
β
Set a backlog quota policy for a namespace
Usage
$ pulsar-admin namespaces set-backlog-quota tenant/namespace options
Options
Flag | Description | Default |
---|---|---|
-l , --limit | The backlog size limit (for example 10M or 16G ) | |
-p , --policy | The retention policy to enforce when the limit is reached. The valid options are: producer_request_hold , producer_exception or consumer_backlog_eviction |
Example
$ pulsar-admin namespaces set-backlog-quota my-tenant/my-ns \
--limit 2G \
--policy producer_request_hold
remove-backlog-quota
β
Remove a backlog quota policy from a namespace
Usage
$ pulsar-admin namespaces remove-backlog-quota tenant/namespace
get-persistence
β
Get the persistence policies for a namespace
Usage
$ pulsar-admin namespaces get-persistence tenant/namespace
set-persistence
β
Set the persistence policies for a namespace
Usage
$ pulsar-admin namespaces set-persistence tenant/namespace options
Options
Flag | Description | Default |
---|---|---|
-a , --bookkeeper-ack-quorum | The number of acks (guaranteed copies) to wait for each entry | 0 |
-e , --bookkeeper-ensemble | The number of bookies to use for a topic | 0 |
-w , --bookkeeper-write-quorum | How many writes to make of each entry | 0 |
-r , --ml-mark-delete-max-rate | Throttling rate of mark-delete operation (0 means no throttle) |
get-message-ttl
β
Get the message TTL for a namespace
Usage
$ pulsar-admin namespaces get-message-ttl tenant/namespace
set-message-ttl
β
Set the message TTL for a namespace
Usage
$ pulsar-admin namespaces set-message-ttl tenant/namespace options
Options
Flag | Description | Default |
---|---|---|
-ttl , --messageTTL | Message TTL in seconds. When the value is set to 0 , TTL is disabled. TTL is disabled by default. | 0 |
get-anti-affinity-group
β
Get Anti-affinity group name for a namespace
Usage
$ pulsar-admin namespaces get-anti-affinity-group tenant/namespace
set-anti-affinity-group
β
Set Anti-affinity group name for a namespace
Usage
$ pulsar-admin namespaces set-anti-affinity-group tenant/namespace options
Options
Flag | Description | Default |
---|---|---|
-g , --group | Anti-affinity group name |
get-anti-affinity-namespaces
β
Get Anti-affinity namespaces grouped with the given anti-affinity group name
Usage
$ pulsar-admin namespaces get-anti-affinity-namespaces options
Options
Flag | Description | Default |
---|---|---|
-c , --cluster | Cluster name | |
-g , --group | Anti-affinity group name | |
-p , --tenant | Tenant is only used for authorization. Client has to be admin of any of the tenant to access this api |
delete-anti-affinity-group
β
Remove Anti-affinity group name for a namespace
Usage
$ pulsar-admin namespaces delete-anti-affinity-group tenant/namespace
get-retention
β
Get the retention policy for a namespace
Usage
$ pulsar-admin namespaces get-retention tenant/namespace
set-retention
β
Set the retention policy for a namespace
Usage
$ pulsar-admin namespaces set-retention tenant/namespace
Options
Flag | Description | Default |
---|---|---|
-s , --size | The retention size limits (for example 10M, 16G or 3T). 0 means no retention and -1 means infinite size retention | |
-t , --time | The retention time in minutes, hours, days, or weeks. Examples: 100m, 13h, 2d, 5w. 0 means no retention and -1 means infinite time retention |
unload
β
Unload a namespace or namespace bundle from the current serving broker.
Usage
$ pulsar-admin namespaces unload tenant/namespace options
Options
Flag | Description | Default |
---|---|---|
-b , --bundle | {start-boundary}_{end-boundary} (e.g. 0x00000000_0xffffffff) |
split-bundle
β
Split a namespace-bundle from the current serving broker
Usage
$ pulsar-admin namespaces split-bundle tenant/namespace options
Options
Flag | Description | Default |
---|---|---|
-b , --bundle | {start-boundary}_{end-boundary} (e.g. 0x00000000_0xffffffff) | |
-u , --unload | Unload newly split bundles after splitting old bundle | false |
set-dispatch-rate
β
Set message-dispatch-rate for all topics of the namespace
Usage
$ pulsar-admin namespaces set-dispatch-rate tenant/namespace options
Options
Flag | Description | Default |
---|---|---|
-bd , --byte-dispatch-rate | The byte dispatch rate (default -1 will be overwrite if not passed) | -1 |
-dt , --dispatch-rate-period | The dispatch rate period in second type (default 1 second will be overwrite if not passed) | 1 |
-md , --msg-dispatch-rate | The message dispatch rate (default -1 will be overwrite if not passed) | -1 |
get-dispatch-rate
β
Get configured message-dispatch-rate for all topics of the namespace (Disabled if value < 0)
Usage
$ pulsar-admin namespaces get-dispatch-rate tenant/namespace
set-subscribe-rate
β
Set subscribe-rate per consumer for all topics of the namespace
Usage
$ pulsar-admin namespaces set-subscribe-rate tenant/namespace options
Options
Flag | Description | Default |
---|---|---|
-sr , --subscribe-rate | The subscribe rate (default -1 will be overwrite if not passed) | -1 |
-st , --subscribe-rate-period | The subscribe rate period in second type (default 30 second will be overwrite if not passed) | 30 |
get-subscribe-rate
β
Get configured subscribe-rate per consumer for all topics of the namespace
Usage
$ pulsar-admin namespaces get-subscribe-rate tenant/namespace
set-subscription-dispatch-rate
β
Set subscription message-dispatch-rate for all subscription of the namespace
Usage
$ pulsar-admin namespaces set-subscription-dispatch-rate tenant/namespace options
Options
Flag | Description | Default |
---|---|---|
-bd , --byte-dispatch-rate | The byte dispatch rate (default -1 will be overwrite if not passed) | -1 |
-dt , --dispatch-rate-period | The dispatch rate period in second type (default 1 second will be overwrite if not passed) | 1 |
-md , --sub-msg-dispatch-rate | The message dispatch rate (default -1 will be overwrite if not passed) | -1 |
get-subscription-dispatch-rate
β
Get subscription configured message-dispatch-rate for all topics of the namespace (Disabled if value < 0)
Usage
$ pulsar-admin namespaces get-subscription-dispatch-rate tenant/namespace
clear-backlog
β
Clear the backlog for a namespace
Usage
$ pulsar-admin namespaces clear-backlog tenant/namespace options
Options
Flag | Description | Default |
---|---|---|
-b , --bundle | {start-boundary}_{end-boundary} (e.g. 0x00000000_0xffffffff) | |
-force , --force | Whether to force a clear backlog without prompt | false |
-s , --sub | The subscription name |
unsubscribe
β
Unsubscribe the given subscription on all destinations on a namespace
Usage
$ pulsar-admin namespaces unsubscribe tenant/namespace options
Options
Flag | Description | Default |
---|---|---|
-b , --bundle | {start-boundary}_{end-boundary} (e.g. 0x00000000_0xffffffff) | |
-s , --sub | The subscription name |
set-encryption-required
β
Enable or disable message encryption required for a namespace
Usage
$ pulsar-admin namespaces set-encryption-required tenant/namespace options
Options
Flag | Description | Default |
---|---|---|
-d , --disable | Disable message encryption required | false |
-e , --enable | Enable message encryption required | false |
set-subscription-auth-mode
β
Set subscription auth mode on a namespace
Usage
$ pulsar-admin namespaces set-subscription-auth-mode tenant/namespace options
Options
Flag | Description | Default |
---|---|---|
-m , --subscription-auth-mode | Subscription authorization mode for Pulsar policies. Valid options are: [None, Prefix] |
get-max-producers-per-topic
β
Get maxProducersPerTopic for a namespace
Usage
$ pulsar-admin namespaces get-max-producers-per-topic tenant/namespace
set-max-producers-per-topic
β
Set maxProducersPerTopic for a namespace
Usage
$ pulsar-admin namespaces set-max-producers-per-topic tenant/namespace options
Options
Flag | Description | Default |
---|---|---|
-p , --max-producers-per-topic | maxProducersPerTopic for a namespace | 0 |
get-max-consumers-per-topic
β
Get maxConsumersPerTopic for a namespace
Usage
$ pulsar-admin namespaces get-max-consumers-per-topic tenant/namespace
set-max-consumers-per-topic
β
Set maxConsumersPerTopic for a namespace
Usage
$ pulsar-admin namespaces set-max-consumers-per-topic tenant/namespace options
Options
Flag | Description | Default |
---|---|---|
-c , --max-consumers-per-topic | maxConsumersPerTopic for a namespace | 0 |
get-max-consumers-per-subscription
β
Get maxConsumersPerSubscription for a namespace
Usage
$ pulsar-admin namespaces get-max-consumers-per-subscription tenant/namespace
set-max-consumers-per-subscription
β
Set maxConsumersPerSubscription for a namespace
Usage
$ pulsar-admin namespaces set-max-consumers-per-subscription tenant/namespace options
Options
Flag | Description | Default |
---|---|---|
-c , --max-consumers-per-subscription | maxConsumersPerSubscription for a namespace | 0 |
get-compaction-threshold
β
Get compactionThreshold for a namespace
Usage
$ pulsar-admin namespaces get-compaction-threshold tenant/namespace
set-compaction-threshold
β
Set compactionThreshold for a namespace
Usage
$ pulsar-admin namespaces set-compaction-threshold tenant/namespace options
Options
Flag | Description | Default |
---|---|---|
-t , --threshold | Maximum number of bytes in a topic backlog before compaction is triggered (eg: 10M, 16G, 3T). 0 disables automatic compaction | 0 |
get-offload-threshold
β
Get offloadThreshold for a namespace
Usage
$ pulsar-admin namespaces get-offload-threshold tenant/namespace
set-offload-threshold
β
Set offloadThreshold for a namespace
Usage
$ pulsar-admin namespaces set-offload-threshold tenant/namespace options
Options
Flag | Description | Default |
---|---|---|
-s , --size | Maximum number of bytes stored in the pulsar cluster for a topic before data will start being automatically offloaded to longterm storage (eg: 10M, 16G, 3T, 100). Negative values disable automatic offload. 0 triggers offloading as soon as possible. | -1 |
get-offload-deletion-lag
β
Get offloadDeletionLag, in minutes, for a namespace
Usage
$ pulsar-admin namespaces get-offload-deletion-lag tenant/namespace
set-offload-deletion-lag
β
Set offloadDeletionLag for a namespace
Usage
$ pulsar-admin namespaces set-offload-deletion-lag tenant/namespace options
Options
Flag | Description | Default |
---|---|---|
-l , --lag | Duration to wait after offloading a ledger segment, before deleting the copy of that segment from cluster local storage. (eg: 10m, 5h, 3d, 2w). | -1 |
clear-offload-deletion-lag
β
Clear offloadDeletionLag for a namespace
Usage
$ pulsar-admin namespaces clear-offload-deletion-lag tenant/namespace
get-schema-autoupdate-strategy
β
Get the schema auto-update strategy for a namespace
Usage
$ pulsar-admin namespaces get-schema-autoupdate-strategy tenant/namespace
set-schema-autoupdate-strategy
β
Set the schema auto-update strategy for a namespace
Usage
$ pulsar-admin namespaces set-schema-autoupdate-strategy tenant/namespace options
Options
Flag | Description | Default |
---|---|---|
-c , --compatibility | Compatibility level required for new schemas created via a Producer. Possible values (Full, Backward, Forward, None). | Full |
-d , --disabled | Disable automatic schema updates. | false |
ns-isolation-policy
β
Operations for managing namespace isolation policies.
Usage
$ pulsar-admin ns-isolation-policy subcommand
Subcommands
set
get
list
delete
brokers
broker
set
β
Create/update a namespace isolation policy for a cluster. This operation requires Pulsar superuser privileges.
Usage
$ pulsar-admin ns-isolation-policy set cluster-name policy-name options
Options
Flag | Description | Default |
---|---|---|
--auto-failover-policy-params | Comma-separated name=value auto failover policy parameters | [] |
--auto-failover-policy-type | Auto failover policy type name. Currently available options: min_available. | [] |
--namespaces | Comma-separated namespaces regex list | [] |
--primary | Comma-separated primary broker regex list | [] |
--secondary | Comma-separated secondary broker regex list | [] |
get
β
Get the namespace isolation policy of a cluster. This operation requires Pulsar superuser privileges.
Usage
$ pulsar-admin ns-isolation-policy get cluster-name policy-name
list
β
List all namespace isolation policies of a cluster. This operation requires Pulsar superuser privileges.
Usage
$ pulsar-admin ns-isolation-policy list cluster-name
delete
β
Delete namespace isolation policy of a cluster. This operation requires superuser privileges.
Usage
$ pulsar-admin ns-isolation-policy delete
brokers
β
List all brokers with namespace-isolation policies attached to it. This operation requires Pulsar super-user privileges.
Usage
$ pulsar-admin ns-isolation-policy brokers cluster-name
broker
β
Get broker with namespace-isolation policies attached to it. This operation requires Pulsar super-user privileges.
Usage
$ pulsar-admin ns-isolation-policy broker cluster-name options
Options
Flag | Description | Default |
---|---|---|
--broker | Broker name to get namespace-isolation policies attached to it |
sink
β
An interface for managing Pulsar IO sinks (egress data from Pulsar)
Usage
$ pulsar-admin sink subcommand
Subcommands
create
update
delete
localrun
available-sinks
create
β
Submit a Pulsar IO sink connector to run in a Pulsar cluster
Usage
$ pulsar-admin sink create options
Options
Flag | Description | Default |
---|---|---|
--classname | The sinkβs Java class name | |
--cpu | The CPU (in cores) that needs to be allocated per sink instance (applicable only to the Docker runtime) | |
--custom-serde-inputs | The map of input topics to SerDe class names (as a JSON string) | |
--custom-schema-inputs | The map of input topics to Schema types or class names (as a JSON string) | |
--disk | The disk (in bytes) that needs to be allocated per sink instance (applicable only to the Docker runtime) | |
--inputs | The sinkβs input topic(s) (multiple topics can be specified as a comma-separated list) | |
--archive | Path to the archive file for the sink | |
--name | The sinkβs name | |
--namespace | The sinkβs namespace | |
--parallelism | "The sinkβs parallelism factor (i.e. the number of sink instances to run)." | |
--processing-guarantees | "The processing guarantees (aka delivery semantics) applied to the sink. Available values: ATLEAST_ONCE, ATMOST_ONCE, EFFECTIVELY_ONCE." | |
--ram | The RAM (in bytes) that needs to be allocated per sink instance (applicable only to the Docker runtime) | |
--sink-config | Sink config key/values | |
--sink-config-file | The path to a YAML config file specifying the sinkβs configuration | |
--sink-type | The built-in sinks's connector provider. The sink-type parameter of the currently built-in connectors is determined by the setting of the name parameter specified in the pulsar-io.yaml file. | |
--topics-pattern | TopicsPattern to consume from list of topics under a namespace that match the pattern. | |
--tenant | The sinkβs tenant | |
--auto-ack | Let the functions framework manage acking | |
--timeout-ms | The message timeout in milliseconds |
update
β
Submit a Pulsar IO sink connector to run in a Pulsar cluster
Usage
$ pulsar-admin sink update options
Options
Flag | Description | Default |
---|---|---|
--classname | The sinkβs Java class name | |
--cpu | The CPU (in cores) that needs to be allocated per sink instance (applicable only to the Docker runtime) | |
--custom-serde-inputs | The map of input topics to SerDe class names (as a JSON string) | |
--custom-schema-inputs | The map of input topics to Schema types or class names (as a JSON string) | |
--disk | The disk (in bytes) that needs to be allocated per sink instance (applicable only to the Docker runtime) | |
--inputs | The sinkβs input topic(s) (multiple topics can be specified as a comma-separated list) | |
--archive | Path to the archive file for the sink | |
--name | The sinkβs name | |
--namespace | The sinkβs namespace | |
--parallelism | "The sinkβs parallelism factor (i.e. the number of sink instances to run)." | |
--processing-guarantees | "The processing guarantees (aka delivery semantics) applied to the sink. Available values: ATLEAST_ONCE, ATMOST_ONCE, EFFECTIVELY_ONCE." | |
--ram | The RAM (in bytes) that needs to be allocated per sink instance (applicable only to the Docker runtime) | |
--sink-config | Sink config key/values | |
--sink-config-file | The path to a YAML config file specifying the sinkβs configuration | |
--sink-type | The built-in sinks's connector provider. The sink-type parameter of the currently built-in connectors is determined by the setting of the name parameter specified in the pulsar-io.yaml file. | |
--topics-pattern | TopicsPattern to consume from list of topics under a namespace that match the pattern. | |
--tenant | The sinkβs tenant |
delete
β
Stops a Pulsar IO sink
Usage
$ pulsar-admin sink delete options
Options
Flag | Description | Default |
---|---|---|
--name | The name of the function to delete | |
--namespace | The namespace of the function to delete | |
--tenant | The tenant of the function to delete |
localrun
β
Run the Pulsar sink locally (rather than in the Pulsar cluster)
Usage
$ pulsar-admin sink localrun options
Options
Flag | Description | Default |
---|---|---|
--broker-service-url | The URL for the Pulsar broker | |
--classname | The sinkβs Java class name | |
--cpu | The CPU (in cores) that needs to be allocated per sink instance (applicable only to the Docker runtime) | |
--custom-serde-inputs | The map of input topics to SerDe class names (as a JSON string) | |
--custom-schema-inputs | The map of input topics to Schema types or class names (as a JSON string) | |
--disk | The disk (in bytes) that needs to be allocated per sink instance (applicable only to the Docker runtime) | |
--inputs | The sinkβs input topic(s) (multiple topics can be specified as a comma-separated list) | |
--archive | Path to the archive file for the sink | |
--name | The sinkβs name | |
--namespace | The sinkβs namespace | |
--parallelism | "The sinkβs parallelism factor (i.e. the number of sink instances to run)." | |
--processing-guarantees | "The processing guarantees (aka delivery semantics) applied to the sink. Available values: ATLEAST_ONCE, ATMOST_ONCE, EFFECTIVELY_ONCE." | |
--ram | The RAM (in bytes) that needs to be allocated per sink instance (applicable only to the Docker runtime) | |
--sink-config | Sink config key/values | |
--sink-config-file | The path to a YAML config file specifying the sinkβs configuration | |
--sink-type | The built-in sinks's connector provider. The sink-type parameter of the currently built-in connectors is determined by the setting of the name parameter specified in the pulsar-io.yaml file. | |
--topics-pattern | TopicsPattern to consume from list of topics under a namespace that match the pattern. | |
--tenant | The sinkβs tenant | |
--auto-ack | Let the functions framework manage acking | |
--timeout-ms | The message timeout in milliseconds |
available-sinks
β
Get a list of all built-in sink connectors
Usage
$ pulsar-admin sink available-sinks
source
β
An interface for managing Pulsar IO sources (ingress data into Pulsar)
Usage
$ pulsar-admin source subcommand
Subcommands
create
update
delete
localrun
available-sources
create
β
Submit a Pulsar IO source connector to run in a Pulsar cluster
Usage
$ pulsar-admin source create options
Options
Flag | Description | Default |
---|---|---|
--classname | The sourceβs Java class name | |
--cpu | The CPU (in cores) that needs to be allocated per source instance (applicable only to the Docker runtime) | |
--deserialization-classname | The SerDe classname for the source | |
--destination-topic-name | The Pulsar topic to which data is sent | |
--disk | The disk (in bytes) that needs to be allocated per source instance (applicable only to the Docker runtime) | |
--archive | The path to the NAR archive for the Source | |
--name | The sourceβs name | |
--namespace | The sourceβs namespace | |
--parallelism | The sourceβs parallelism factor (i.e. the number of source instances to run). | |
--processing-guarantees | "The processing guarantees (aka delivery semantics) applied to the source. Available values: ATLEAST_ONCE, ATMOST_ONCE, EFFECTIVELY_ONCE." | |
--ram | The RAM (in bytes) that needs to be allocated per source instance (applicable only to the Docker runtime) | |
--schema-type | The schema type (either a builtin schema like 'avro', 'json', etc, or custom Schema class name to be used to encode messages emitted from the source | |
--source-type | One of the built-in source's connector provider. The source's connector provider. The source-type parameter of the currently built-in connectors is determined by the setting of the name parameter specified in the pulsar-io.yaml file. | |
--source-config | Source config key/values | |
--source-config-file | The path to a YAML config file specifying the sourceβs configuration | |
--tenant | The sourceβs tenant |
update
β
Update a already submitted Pulsar IO source connector
Usage
$ pulsar-admin source update options
Options
Flag | Description | Default |
---|---|---|
--classname | The sourceβs Java class name | |
--cpu | The CPU (in cores) that needs to be allocated per source instance (applicable only to the Docker runtime) | |
--deserialization-classname | The SerDe classname for the source | |
--destination-topic-name | The Pulsar topic to which data is sent | |
--disk | The disk (in bytes) that needs to be allocated per source instance (applicable only to the Docker runtime) | |
--archive | The path to the NAR archive for the Source | |
--name | The sourceβs name | |
--namespace | The sourceβs namespace | |
--parallelism | The sourceβs parallelism factor (i.e. the number of source instances to run). | |
--processing-guarantees | "The processing guarantees (aka delivery semantics) applied to the source. Available values: ATLEAST_ONCE, ATMOST_ONCE, EFFECTIVELY_ONCE." | |
--ram | The RAM (in bytes) that needs to be allocated per source instance (applicable only to the Docker runtime) | |
--schema-type | The schema type (either a builtin schema like 'avro', 'json', etc, or custom Schema class name to be used to encode messages emitted from the source | |
--source-type | One of the built-in source's connector provider. The source's connector provider. The source-type parameter of the currently built-in connectors is determined by the setting of the name parameter specified in the pulsar-io.yaml file. | |
--source-config | Source config key/values | |
--source-config-file | The path to a YAML config file specifying the sourceβs configuration | |
--tenant | The sourceβs tenant |
delete
β
Stops a Pulsar IO source
Usage
$ pulsar-admin source delete options
Options
Flag | Description | Default |
---|---|---|
--name | The name of the function to delete | |
--namespace | The namespace of the function to delete | |
--tenant | The tenant of the function to delete |
localrun
β
Run the Pulsar source locally (rather than in the Pulsar cluster)
Usage
$ pulsar-admin source localrun options
Options
Flag | Description | Default |
---|---|---|
--classname | The sourceβs Java class name | |
--cpu | The CPU (in cores) that needs to be allocated per source instance (applicable only to the Docker runtime) | |
--deserialization-classname | The SerDe classname for the source | |
--destination-topic-name | The Pulsar topic to which data is sent | |
--disk | The disk (in bytes) that needs to be allocated per source instance (applicable only to the Docker runtime) | |
--archive | The path to the NAR archive for the Source | |
--name | The sourceβs name | |
--namespace | The sourceβs namespace | |
--parallelism | The sourceβs parallelism factor (i.e. the number of source instances to run). | |
--processing-guarantees | "The processing guarantees (aka delivery semantics) applied to the source. Available values: ATLEAST_ONCE, ATMOST_ONCE, EFFECTIVELY_ONCE." | |
--ram | The RAM (in bytes) that needs to be allocated per source instance (applicable only to the Docker runtime) | |
--schema-type | The schema type (either a builtin schema like 'avro', 'json', etc, or custom Schema class name to be used to encode messages emitted from the source | |
--source-type | One of the built-in source's connector provider. The source's connector provider. The source-type parameter of the currently built-in connectors is determined by the setting of the name parameter specified in the pulsar-io.yaml file. | |
--source-config | Source config key/values | |
--source-config-file | The path to a YAML config file specifying the sourceβs configuration | |
--tenant | The sourceβs tenant |
available-sources
β
Get a list of all built-in source connectors
Usage
$ pulsar-admin source available-sources
topics
β
Operations for managing Pulsar topics (both persistent and non persistent)
Usage
$ pulsar-admin topics subcommand
Subcommands
compact
compaction-status
offload
offload-status
create-partitioned-topic
delete-partitioned-topic
create
get-partitioned-topic-metadata
update-partitioned-topic
list
list-in-bundle
terminate
permissions
grant-permission
revoke-permission
lookup
bundle-range
delete
unload
subscriptions
unsubscribe
stats
stats-internal
info-internal
partitioned-stats
skip
skip-all
expire-messages
expire-messages-all-subscriptions
peek-messages
reset-cursor
compact
β
Run compaction on the specified topic (persistent topics only)
Usage
$ pulsar-admin topics compact persistent://tenant/namespace/topic
compaction-status
β
Check the status of a topic compaction (persistent topics only)
Usage
$ pulsar-admin topics compaction-status persistent://tenant/namespace/topic
Options
Flag | Description | Default |
---|---|---|
-w , --wait-complete | Wait for compaction to complete | false |
offload
β
Trigger offload of data from a topic to long-term storage (e.g. Amazon S3)
Usage
$ pulsar-admin topics offload persistent://tenant/namespace/topic options
Options
Flag | Description | Default |
---|---|---|
-s , --size-threshold | The maximum amount of data to keep in BookKeeper for the specific topic |
offload-status
β
Check the status of data offloading from a topic to long-term storage
Usage
$ pulsar-admin topics offload-status persistent://tenant/namespace/topic op
Options
Flag | Description | Default |
---|---|---|
-w , --wait-complete | Wait for compaction to complete | false |
create-partitioned-topic
β
Create a partitioned topic. A partitioned topic must be created before producers can publish to it.
Usage
$ pulsar-admin topics create-partitioned-topic {persistent|non-persistent}://tenant/namespace/topic options
Options
Flag | Description | Default |
---|---|---|
-p , --partitions | The number of partitions for the topic | 0 |
delete-partitioned-topic
β
Delete a partitioned topic. This will also delete all the partitions of the topic if they exist.
Usage
$ pulsar-admin topics delete-partitioned-topic {persistent|non-persistent}
create
β
Creates a non-partitioned topic. A non-partitioned topic must explicitly be created by the user if allowAutoTopicCreation or createIfMissing is disabled.
Usage
$ pulsar-admin topics create {persistent|non-persistent}://tenant/namespace/topic
get-partitioned-topic-metadata
β
Get the partitioned topic metadata. If the topic is not created or is a non-partitioned topic, this will return an empty topic with zero partitions.
Usage
$ pulsar-admin topics get-partitioned-topic-metadata {persistent|non-persistent}://tenant/namespace/topic
update-partitioned-topic
β
Update existing non-global partitioned topic. New updating number of partitions must be greater than existing number of partitions.
Usage
$ pulsar-admin topics update-partitioned-topic {persistent|non-persistent}://tenant/namespace/topic options
Options
Flag | Description | Default |
---|---|---|
-p , --partitions | The number of partitions for the topic | 0 |
list
β
Get the list of topics under a namespace
Usage
$ pulsar-admin topics list tenant/cluster/namespace
list-in-bundle
β
Get a list of non-persistent topics present under a namespace bundle
Usage
$ pulsar-admin topics list-in-bundle tenant/namespace options
Options
Flag | Description | Default |
---|---|---|
-b , --bundle | The bundle range |
terminate
β
Terminate a persistent topic (disallow further messages from being published on the topic)
Usage
$ pulsar-admin topics terminate persistent://tenant/namespace/topic
permissions
β
Get the permissions on a topic. Retrieve the effective permissions for a destination. These permissions are defined by the permissions set at the namespace level combined (union) with any eventual specific permissions set on the topic.
Usage
$ pulsar-admin topics permissions topic
grant-permission
β
Grant a new permission to a client role on a single topic
Usage
$ pulsar-admin topics grant-permission {persistent|non-persistent}://tenant/namespace/topic options
Options
Flag | Description | Default |
---|---|---|
--actions | Actions to be granted (produce or consume ) | |
--role | The client role to which to grant the permissions |
revoke-permission
β
Revoke permissions to a client role on a single topic. If the permission was not set at the topic level, but rather at the namespace level, this operation will return an error (HTTP status code 412).
Usage
$ pulsar-admin topics revoke-permission topic
lookup
β
Look up a topic from the current serving broker
Usage
$ pulsar-admin topics lookup topic
bundle-range
β
Get the namespace bundle which contains the given topic
Usage
$ pulsar-admin topics bundle-range topic
delete
β
Delete a topic. The topic cannot be deleted if there are any active subscriptions or producers connected to the topic.
Usage
$ pulsar-admin topics delete topic
unload
β
Unload a topic
Usage
$ pulsar-admin topics unload topic
subscriptions
β
Get the list of subscriptions on the topic
Usage
$ pulsar-admin topics subscriptions topic
unsubscribe
β
Delete a durable subscriber from a topic
Usage
$ pulsar-admin topics unsubscribe topic options
Options
Flag | Description | Default |
---|---|---|
-s , --subscription | The subscription to delete |
stats
β
Get the stats for the topic and its connected producers and consumers. All rates are computed over a 1-minute window and are relative to the last completed 1-minute period.
Usage
$ pulsar-admin topics stats topic
stats-internal
β
Get the internal stats for the topic
Usage
$ pulsar-admin topics stats-internal topic
info-internal
β
Get the internal metadata info for the topic
Usage
$ pulsar-admin topics info-internal topic
partitioned-stats
β
Get the stats for the partitioned topic and its connected producers and consumers. All rates are computed over a 1-minute window and are relative to the last completed 1-minute period.
Usage
$ pulsar-admin topics partitioned-stats topic options
Options
Flag | Description | Default |
---|---|---|
--per-partition | Get per-partition stats | false |
skip
β
Skip some messages for the subscription
Usage
$ pulsar-admin topics skip topic options
Options
Flag | Description | Default |
---|---|---|
-n , --count | The number of messages to skip | 0 |
-s , --subscription | The subscription on which to skip messages |
skip-all
β
Skip all the messages for the subscription
Usage
$ pulsar-admin topics skip-all topic options
Options
Flag | Description | Default |
---|---|---|
-s , --subscription | The subscription to clear |
expire-messages
β
Expire messages that are older than the given expiry time (in seconds) for the subscription.
Usage
$ pulsar-admin topics expire-messages topic options
Options
Flag | Description | Default |
---|---|---|
-t , --expireTime | Expire messages older than the time (in seconds) | 0 |
-s , --subscription | The subscription to skip messages on |
expire-messages-all-subscriptions
β
Expire messages older than the given expiry time (in seconds) for all subscriptions
Usage
$ pulsar-admin topics expire-messages-all-subscriptions topic options
Options
Flag | Description | Default |
---|---|---|
-t , --expireTime | Expire messages older than the time (in seconds) | 0 |
peek-messages
β
Peek some messages for the subscription.
Usage
$ pulsar-admin topics peek-messages topic options
Options
Flag | Description | Default |
---|---|---|
-n , --count | The number of messages | 0 |
-s , --subscription | Subscription to get messages from |
reset-cursor
β
Reset position for subscription to closest to timestamp
Usage
$ pulsar-admin topics reset-cursor topic options
Options
Flag | Description | Default |
---|---|---|
-s , --subscription | Subscription to reset position on | |
-t , --time | The time, in minutes, to reset back to (or minutes, hours, days, weeks, etc.). Examples: 100m , 3h , 2d , 5w . |
tenants
β
Operations for managing tenants
Usage
$ pulsar-admin tenants subcommand
Subcommands
list
get
create
update
delete
list
β
List the existing tenants
Usage
$ pulsar-admin tenants list
get
β
Gets the configuration of a tenant
Usage
$ pulsar-admin tenants get tenant-name
create
β
Creates a new tenant
Usage
$ pulsar-admin tenants create tenant-name options
Options
Flag | Description | Default |
---|---|---|
-r , --admin-roles | Comma-separated admin roles | |
-c , --allowed-clusters | Comma-separated allowed clusters |
update
β
Updates a tenant
Usage
$ pulsar-admin tenants update tenant-name options
Options
Flag | Description | Default |
---|---|---|
-r , --admin-roles | Comma-separated admin roles | |
-c , --allowed-clusters | Comma-separated allowed clusters |
delete
β
Deletes an existing tenant
Usage
$ pulsar-admin tenants delete tenant-name
resource-quotas
β
Operations for managing resource quotas
Usage
$ pulsar-admin resource-quotas subcommand
Subcommands
get
set
reset-namespace-bundle-quota
get
β
Get the resource quota for a specified namespace bundle, or default quota if no namespace/bundle is specified.
Usage
$ pulsar-admin resource-quotas get options
Options
Flag | Description | Default |
---|---|---|
-b , --bundle | A bundle of the form {start-boundary}_{end_boundary}. This must be specified together with -n/--namespace. | |
-n , --namespace | The namespace |
set
β
Set the resource quota for the specified namespace bundle, or default quota if no namespace/bundle is specified.
Usage
$ pulsar-admin resource-quotas set options
Options
Flag | Description | Default |
---|---|---|
-bi , --bandwidthIn | The expected inbound bandwidth (in bytes/second) | 0 |
-bo , --bandwidthOut | Expected outbound bandwidth (in bytes/second)0 | |
-b , --bundle | A bundle of the form {start-boundary}_{end_boundary}. This must be specified together with -n/--namespace. | |
-d , --dynamic | Allow to be dynamically re-calculated (or not) | false |
-mem , --memory | Expectred memory usage (in megabytes) | 0 |
-mi , --msgRateIn | Expected incoming messages per second | 0 |
-mo , --msgRateOut | Expected outgoing messages per second | 0 |
-n , --namespace | The namespace as tenant/namespace, for example my-tenant/my-ns. Must be specified together with -b/--bundle. |
reset-namespace-bundle-quota
β
Reset the specified namespace bundle's resource quota to a default value.
Usage
$ pulsar-admin resource-quotas reset-namespace-bundle-quota options
Options
Flag | Description | Default |
---|---|---|
-b , --bundle | A bundle of the form {start-boundary}_{end_boundary}. This must be specified together with -n/--namespace. | |
-n , --namespace | The namespace |
schemas
β
Operations related to Schemas associated with Pulsar topics.
Usage
$ pulsar-admin schemas subcommand
Subcommands
upload
delete
get
extract
upload
β
Upload the schema definition for a topic
Usage
$ pulsar-admin schemas upload persistent://tenant/namespace/topic options
Options
Flag | Description | Default |
---|---|---|
--filename | The path to the schema definition file. An example schema file is available under conf directory. |
delete
β
Delete the schema definition associated with a topic
Usage
$ pulsar-admin schemas delete persistent://tenant/namespace/topic
get
β
Retrieve the schema definition associated with a topic (at a given version if version is supplied).
Usage
$ pulsar-admin schemas get persistent://tenant/namespace/topic options
Options
Flag | Description | Default |
---|---|---|
--version | The version of the schema definition to retrieve for a topic. |
extract
β
Provide the schema definition for a topic via Java class name contained in a JAR file
Usage
$ pulsar-admin schemas extract persistent://tenant/namespace/topic options
Options
Flag | Description | Default |
---|---|---|
-c , --classname | The Java class name | |
-j , --jar | A path to the JAR file which contains the above Java class | |
-t , --type | The type of the schema (avro or json) |