Skip to main content

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
  • sinks
  • sources
  • 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

FlagDescriptionDefault
-i, --indentIndent JSON outputfalse

mbeans‚Äč

Dump Mbean stats

Usage


$ pulsar-admin broker-stats mbeans options

Options

FlagDescriptionDefault
-i, --indentIndent JSON outputfalse

monitoring-metrics‚Äč

Dump metrics for monitoring

Usage


$ pulsar-admin broker-stats monitoring-metrics options

Options

FlagDescriptionDefault
-i, --indentIndent JSON outputfalse

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

FlagDescriptionDefault
--urlThe URL for the broker

update-dynamic-config‚Äč

Update a broker's dynamic service configuration

Usage


$ pulsar-admin brokers update-dynamic-config options

Options

FlagDescriptionDefault
--configService configuration parameter name
--valueValue 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

FlagDescriptionDefault
--broker-urlThe URL for the broker service.
--broker-url-secureThe broker service URL for a secure connection
--urlservice-url
--url-secureservice-url for secure connection

update‚Äč

Update the configuration for a cluster

Usage


$ pulsar-admin clusters update cluster-name options

Options

FlagDescriptionDefault
--broker-urlThe URL for the broker service.
--broker-url-secureThe broker service URL for a secure connection
--urlservice-url
--url-secureservice-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

FlagDescriptionDefault
--peer-clustersComma 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

FlagDescriptionDefault
--domain-nameThe 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

FlagDescriptionDefault
--broker-listComma separated broker list
--domain-nameThe 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

FlagDescriptionDefault
--broker-listComma separated broker list
--domain-nameThe 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

FlagDescriptionDefault
--domain-nameThe 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
  • restart
  • stop
  • start
  • status
  • stats
  • list
  • querystate
  • trigger

localrun‚Äč

Run the Pulsar Function locally (rather than deploying it to the Pulsar cluster)

Usage


$ pulsar-admin functions localrun options

Options

FlagDescriptionDefault
--cpuThe cpu in cores that need to be allocated per function instance(applicable only to docker runtime)
--ramThe ram in bytes that need to be allocated per function instance(applicable only to process/docker runtime)
--diskThe disk in bytes that need to be allocated per function instance(applicable only to docker runtime)
--auto-ackWhether or not the framework will automatically acknowledge messages
--subs-namePulsar source subscription name if user wants a specific subscription-name for input-topic consumer
--broker-service-url The URL of the Pulsar broker
--classnameThe function's class name
--custom-serde-inputsThe map of input topics to SerDe class names (as a JSON string)
--custom-schema-inputsThe map of input topics to Schema class names (as a JSON string)
--client-auth-paramsClient authentication param
--client-auth-pluginClient authentication plugin using which function-process can connect to broker
--function-config-fileThe path to a YAML config file specifying the function's configuration
--hostname-verification-enabledEnable hostname verificationfalse
--instance-id-offsetStart the instanceIds from this offset0
--inputsThe function's input topic or topics (multiple topics can be specified as a comma-separated list)
--log-topicThe topic to which the function's logs are produced
--jarPath to the jar file for the function (if the function is written in Java). It also supports url-path [http/https/file (file protocol assumes that file already exists on worker host)] from which worker can download the package.
--nameThe function's name
--namespaceThe function's namespace
--outputThe function's output topic (If none is specified, no output is written)
--output-serde-classnameThe SerDe class to be used for messages output by the function
--parallelismThe function’s parallelism factor, i.e. the number of instances of the function to run1
--processing-guaranteesThe processing guarantees (aka delivery semantics) applied to the function. Possible Values: [ATLEAST_ONCE, ATMOST_ONCE, EFFECTIVELY_ONCE]ATLEAST_ONCE
--pyPath to the main Python file/Python Wheel file for the function (if the function is written in Python)
--schema-typeThe builtin schema type or custom schema class name to be used for messages output by the function
--sliding-interval-countThe number of messages after which the window slides
--sliding-interval-duration-msThe time duration after which the window slides
--state-storage-service-urlThe URL for the state storage service. By default, it it set to the service URL of the Apache BookKeeper. This service URL must be added manually when the Pulsar Function runs locally.
--tenantThe function’s tenant
--topics-patternThe topic pattern to consume from list of topics under a namespace that match the pattern. [--input] and [--topic-pattern] are mutually exclusive. Add SerDe class name for a pattern in --custom-serde-inputs (supported for java fun only)
--user-configUser-defined config key/values
--window-length-countThe number of messages per window
--window-length-duration-msThe time duration of the window in milliseconds
--dead-letter-topicThe topic where all messages which could not be processed successfully are sent
--fqfnThe Fully Qualified Function Name (FQFN) for the function
--max-message-retriesHow many times should we try to process a message before giving up
--retain-orderingFunction consumes and processes messages in order
--timeout-msThe message timeout in milliseconds
--tls-allow-insecureAllow insecure tls connectionfalse
--tls-trust-cert-pathThe tls trust cert file path
--use-tlsUse tls connectionfalse

create‚Äč

Create a Pulsar Function in cluster mode (i.e. deploy it on a Pulsar cluster)

Usage


$ pulsar-admin functions create options

Options

FlagDescriptionDefault
--cpuThe cpu in cores that need to be allocated per function instance(applicable only to docker runtime)
--ramThe ram in bytes that need to be allocated per function instance(applicable only to process/docker runtime)
--diskThe disk in bytes that need to be allocated per function instance(applicable only to docker runtime)
--auto-ackWhether or not the framework will automatically acknowledge messages
--subs-namePulsar source subscription name if user wants a specific subscription-name for input-topic consumer
--classnameThe function's class name
--custom-serde-inputsThe map of input topics to SerDe class names (as a JSON string)
--custom-schema-inputsThe map of input topics to Schema class names (as a JSON string)
--function-config-fileThe path to a YAML config file specifying the function's configuration
--inputsThe function's input topic or topics (multiple topics can be specified as a comma-separated list)
--log-topicThe topic to which the function's logs are produced
--jarPath to the jar file for the function (if the function is written in Java). It also supports url-path [http/https/file (file protocol assumes that file already exists on worker host)] from which worker can download the package.
--nameThe function's name
--namespaceThe function’s namespace
--outputThe function's output topic (If none is specified, no output is written)
--output-serde-classnameThe SerDe class to be used for messages output by the function
--parallelismThe function’s parallelism factor, i.e. the number of instances of the function to run1
--processing-guaranteesThe processing guarantees (aka delivery semantics) applied to the function. Possible Values: [ATLEAST_ONCE, ATMOST_ONCE, EFFECTIVELY_ONCE]ATLEAST_ONCE
--pyPath to the main Python file/Python Wheel file for the function (if the function is written in Python)
--schema-typeThe builtin schema type or custom schema class name to be used for messages output by the function
--sliding-interval-countThe number of messages after which the window slides
--sliding-interval-duration-msThe time duration after which the window slides
--tenantThe function’s tenant
--topics-patternThe topic pattern to consume from list of topics under a namespace that match the pattern. [--input] and [--topic-pattern] are mutually exclusive. Add SerDe class name for a pattern in --custom-serde-inputs (supported for java fun only)
--user-configUser-defined config key/values
--window-length-countThe number of messages per window
--window-length-duration-msThe time duration of the window in milliseconds
--dead-letter-topicThe topic where all messages which could not be processed
--fqfnThe Fully Qualified Function Name (FQFN) for the function
--max-message-retriesHow many times should we try to process a message before giving up
--retain-orderingFunction consumes and processes messages in order
--timeout-msThe message timeout in milliseconds

delete‚Äč

Delete a Pulsar Function that's running on a Pulsar cluster

Usage


$ pulsar-admin functions delete options

Options

FlagDescriptionDefault
--fqfnThe Fully Qualified Function Name (FQFN) for the function
--nameThe function's name
--namespaceThe function's namespace
--tenantThe function's tenant

update‚Äč

Update a Pulsar Function that's been deployed to a Pulsar cluster

Usage


$ pulsar-admin functions update options

Options

FlagDescriptionDefault
--cpuThe cpu in cores that need to be allocated per function instance(applicable only to docker runtime)
--ramThe ram in bytes that need to be allocated per function instance(applicable only to process/docker runtime)
--diskThe disk in bytes that need to be allocated per function instance(applicable only to docker runtime)
--auto-ackWhether or not the framework will automatically acknowledge messages
--subs-namePulsar source subscription name if user wants a specific subscription-name for input-topic consumer
--classnameThe function's class name
--custom-serde-inputsThe map of input topics to SerDe class names (as a JSON string)
--custom-schema-inputsThe map of input topics to Schema class names (as a JSON string)
--function-config-fileThe path to a YAML config file specifying the function's configuration
--inputsThe function's input topic or topics (multiple topics can be specified as a comma-separated list)
--log-topicThe topic to which the function's logs are produced
--jarPath to the jar file for the function (if the function is written in Java). It also supports url-path [http/https/file (file protocol assumes that file already exists on worker host)] from which worker can download the package.
--nameThe function's name
--namespaceThe function’s namespace
--outputThe function's output topic (If none is specified, no output is written)
--output-serde-classnameThe SerDe class to be used for messages output by the function
--parallelismThe function’s parallelism factor, i.e. the number of instances of the function to run1
--processing-guaranteesThe processing guarantees (aka delivery semantics) applied to the function. Possible Values: [ATLEAST_ONCE, ATMOST_ONCE, EFFECTIVELY_ONCE]ATLEAST_ONCE
--pyPath to the main Python file/Python Wheel file for the function (if the function is written in Python)
--schema-typeThe builtin schema type or custom schema class name to be used for messages output by the function
--sliding-interval-countThe number of messages after which the window slides
--sliding-interval-duration-msThe time duration after which the window slides
--tenantThe function’s tenant
--topics-patternThe topic pattern to consume from list of topics under a namespace that match the pattern. [--input] and [--topic-pattern] are mutually exclusive. Add SerDe class name for a pattern in --custom-serde-inputs (supported for java fun only)
--user-configUser-defined config key/values
--window-length-countThe number of messages per window
--window-length-duration-msThe time duration of the window in milliseconds
--dead-letter-topicThe topic where all messages which could not be processed
--fqfnThe Fully Qualified Function Name (FQFN) for the function
--max-message-retriesHow many times should we try to process a message before giving up
--retain-orderingFunction consumes and processes messages in order
--timeout-msThe message timeout in milliseconds

get‚Äč

Fetch information about a Pulsar Function

Usage


$ pulsar-admin functions get options

Options

FlagDescriptionDefault
--fqfnThe Fully Qualified Function Name (FQFN) for the function
--nameThe function's name
--namespaceThe function's namespace
--tenantThe function's tenant

restart‚Äč

Restart function instance

Usage


$ pulsar-admin functions restart options

Options

FlagDescriptionDefault
--fqfnThe Fully Qualified Function Name (FQFN) for the function
--instance-idThe function instanceId (restart all instances if instance-id is not provided)
--nameThe function's name
--namespaceThe function's namespace
--tenantThe function's tenant

stop‚Äč

Stops function instance

Usage


$ pulsar-admin functions stop options

Options

FlagDescriptionDefault
--fqfnThe Fully Qualified Function Name (FQFN) for the function
--instance-idThe function instanceId (stop all instances if instance-id is not provided)
--nameThe function's name
--namespaceThe function's namespace
--tenantThe function's tenant

start‚Äč

Starts a stopped function instance

Usage


$ pulsar-admin functions start options

Options

FlagDescriptionDefault
--fqfnThe Fully Qualified Function Name (FQFN) for the function
--instance-idThe function instanceId (start all instances if instance-id is not provided)
--nameThe function's name
--namespaceThe function's namespace
--tenantThe function's tenant

status‚Äč

Check the current status of a Pulsar Function

Usage


$ pulsar-admin functions status options

Options

FlagDescriptionDefault
--fqfnThe Fully Qualified Function Name (FQFN) for the function
--instance-idThe function instanceId (Get-status of all instances if instance-id is not provided)
--nameThe function's name
--namespaceThe function's namespace
--tenantThe function's tenant

stats‚Äč

Get the current stats of a Pulsar Function

Usage


$ pulsar-admin functions stats options

Options

FlagDescriptionDefault
--fqfnThe Fully Qualified Function Name (FQFN) for the function
--instance-idThe function instanceId (Get-stats of all instances if instance-id is not provided)
--nameThe function's name
--namespaceThe function's namespace
--tenantThe function's tenant

list‚Äč

List all of the Pulsar Functions running under a specific tenant and namespace

Usage


$ pulsar-admin functions list options

Options

FlagDescriptionDefault
--namespaceThe function's namespace
--tenantThe function's tenant

querystate‚Äč

Fetch the current state associated with a Pulsar Function running in cluster mode

Usage


$ pulsar-admin functions querystate options

Options

FlagDescriptionDefault
--fqfnThe Fully Qualified Function Name (FQFN) for the function
-k, --keyThe key for the state you want to fetch
--nameThe function's name
--namespaceThe function's namespace
--tenantThe function's tenant
-w, --watchWatch for changes in the value associated with a key for a Pulsar Functionfalse

trigger‚Äč

Triggers the specified Pulsar Function with a supplied value

Usage


$ pulsar-admin functions trigger options

Options

FlagDescriptionDefault
--fqfnThe Fully Qualified Function Name (FQFN) for the function
--nameThe function's name
--namespaceThe function's namespace
--tenantThe function's tenant
--topicThe specific topic name that the function consumes from that you want to inject the data to
--trigger-fileThe path to the file that contains the data with which you'd like to trigger the function
--trigger-valueThe value with which you want to trigger the function

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

FlagDescriptionDefault
-b, --bundlesThe number of bundles to activate0
-c, --clustersList 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

FlagDescriptionDefault
--enable, -eEnable message deduplication on the specified namespacefalse
--disable, -dDisable message deduplication on the specified namespacefalse

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

FlagDescriptionDefault
--actionsActions to be granted (produce or consume)
--roleThe 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

FlagDescriptionDefault
--roleThe 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

FlagDescriptionDefault
--rolesThe client roles to which to grant the permissions (comma separated roles)
--subscriptionThe 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

FlagDescriptionDefault
--roleThe client role to which to revoke the permissions
--subscriptionThe 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

FlagDescriptionDefault
-c, --clustersReplication 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

FlagDescriptionDefault
-l, --limitThe backlog size limit (for example 10M or 16G)
-p, --policyThe 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

FlagDescriptionDefault
-a, --bookkeeper-ack-quorumThe number of acks (guaranteed copies) to wait for each entry0
-e, --bookkeeper-ensembleThe number of bookies to use for a topic0
-w, --bookkeeper-write-quorumHow many writes to make of each entry0
-r, --ml-mark-delete-max-rateThrottling 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

FlagDescriptionDefault
-ttl, --messageTTLMessage 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

FlagDescriptionDefault
-g, --groupAnti-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

FlagDescriptionDefault
-c, --clusterCluster name
-g, --groupAnti-affinity group name
-p, --tenantTenant 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

FlagDescriptionDefault
-s, --sizeThe retention size limits (for example 10M, 16G or 3T). 0 means no retention and -1 means infinite size retention
-t, --timeThe 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

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

FlagDescriptionDefault
-b, --bundle{start-boundary}_{end-boundary} (e.g. 0x00000000_0xffffffff)
-u, --unloadUnload newly split bundles after splitting old bundlefalse

set-dispatch-rate‚Äč

Set message-dispatch-rate for all topics of the namespace

Usage


$ pulsar-admin namespaces set-dispatch-rate tenant/namespace options

Options

FlagDescriptionDefault
-bd, --byte-dispatch-rateThe byte dispatch rate (default -1 will be overwrite if not passed)-1
-dt, --dispatch-rate-periodThe dispatch rate period in second type (default 1 second will be overwrite if not passed)1
-md, --msg-dispatch-rateThe 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

FlagDescriptionDefault
-sr, --subscribe-rateThe subscribe rate (default -1 will be overwrite if not passed)-1
-st, --subscribe-rate-periodThe 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

FlagDescriptionDefault
-bd, --byte-dispatch-rateThe byte dispatch rate (default -1 will be overwrite if not passed)-1
-dt, --dispatch-rate-periodThe dispatch rate period in second type (default 1 second will be overwrite if not passed)1
-md, --sub-msg-dispatch-rateThe 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

FlagDescriptionDefault
-b, --bundle{start-boundary}_{end-boundary} (e.g. 0x00000000_0xffffffff)
-force, --forceWhether to force a clear backlog without promptfalse
-s, --subThe subscription name

unsubscribe‚Äč

Unsubscribe the given subscription on all destinations on a namespace

Usage


$ pulsar-admin namespaces unsubscribe tenant/namespace options

Options

FlagDescriptionDefault
-b, --bundle{start-boundary}_{end-boundary} (e.g. 0x00000000_0xffffffff)
-s, --subThe 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

FlagDescriptionDefault
-d, --disableDisable message encryption requiredfalse
-e, --enableEnable message encryption requiredfalse

set-subscription-auth-mode‚Äč

Set subscription auth mode on a namespace

Usage


$ pulsar-admin namespaces set-subscription-auth-mode tenant/namespace options

Options

FlagDescriptionDefault
-m, --subscription-auth-modeSubscription 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

FlagDescriptionDefault
-p, --max-producers-per-topicmaxProducersPerTopic for a namespace0

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

FlagDescriptionDefault
-c, --max-consumers-per-topicmaxConsumersPerTopic for a namespace0

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

FlagDescriptionDefault
-c, --max-consumers-per-subscriptionmaxConsumersPerSubscription for a namespace0

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

FlagDescriptionDefault
-t, --thresholdMaximum number of bytes in a topic backlog before compaction is triggered (eg: 10M, 16G, 3T). 0 disables automatic compaction0

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

FlagDescriptionDefault
-s, --sizeMaximum 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

FlagDescriptionDefault
-l, --lagDuration 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

FlagDescriptionDefault
-c, --compatibilityCompatibility level required for new schemas created via a Producer. Possible values (Full, Backward, Forward, None).Full
-d, --disabledDisable 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

FlagDescriptionDefault
--auto-failover-policy-paramsComma-separated name=value auto failover policy parameters[]
--auto-failover-policy-typeAuto failover policy type name. Currently available options: min_available.[]
--namespacesComma-separated namespaces regex list[]
--primaryComma-separated primary broker regex list[]
--secondaryComma-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

FlagDescriptionDefault
--brokerBroker name to get namespace-isolation policies attached to it

sinks‚Äč

An interface for managing Pulsar IO sinks (egress data from Pulsar)

Usage


$ pulsar-admin sinks subcommand

Subcommands

  • create
  • update
  • delete
  • list
  • get
  • status
  • stop
  • start
  • restart
  • localrun
  • available-sinks

create‚Äč

Submit a Pulsar IO sink connector to run in a Pulsar cluster

Usage


$ pulsar-admin sinks create options

Options

FlagDescriptionDefault
--classnameThe sink's class name if archive is file-url-path (file://)
--cpuThe CPU (in cores) that needs to be allocated per sink instance (applicable only to the Docker runtime)
--custom-serde-inputsThe map of input topics to SerDe class names (as a JSON string)
--custom-schema-inputsThe map of input topics to Schema types or class names (as a JSON string)
--diskThe disk (in bytes) that needs to be allocated per sink instance (applicable only to the Docker runtime)
--inputsThe sink’s input topic(s) (multiple topics can be specified as a comma-separated list)
--archivePath to the archive file for the sink. It also supports url-path [http/https/file (file protocol assumes that file already exists on worker host)] from which worker can download the package.
--nameThe sink’s name
--namespaceThe sink’s namespace
--parallelismThe sink’s parallelism factor (i.e. the number of sink instances to run).
--processing-guaranteesThe processing guarantees (aka delivery semantics) applied to the sink. Available values: ATLEAST_ONCE, ATMOST_ONCE, EFFECTIVELY_ONCE.
--ramThe RAM (in bytes) that needs to be allocated per sink instance (applicable only to the Docker runtime)
--sink-configUser defined configs key/values
--sink-config-fileThe path to a YAML config file specifying the sink’s configuration
--sink-typeThe 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-patternTopicsPattern to consume from list of topics under a namespace that match the pattern. [--input] and [--topicsPattern] are mutually exclusive. Add SerDe class name for a pattern in --customSerdeInputs (supported for java fun only)
--tenantThe sink’s tenant
--auto-ackWhether or not the framework will automatically acknowledge messages
--timeout-msThe message timeout in milliseconds
--retain-orderingSink consumes and sinks messages in order
--subs-namePulsar source subscription name if user wants a specific subscription-name for input-topic consumer

update‚Äč

Update a Pulsar IO sink connector

Usage


$ pulsar-admin sinks update options

Options

FlagDescriptionDefault
--classnameThe sink's class name if archive is file-url-path (file://)
--cpuThe CPU (in cores) that needs to be allocated per sink instance (applicable only to the Docker runtime)
--custom-serde-inputsThe map of input topics to SerDe class names (as a JSON string)
--custom-schema-inputsThe map of input topics to Schema types or class names (as a JSON string)
--diskThe disk (in bytes) that needs to be allocated per sink instance (applicable only to the Docker runtime)
--inputsThe sink’s input topic(s) (multiple topics can be specified as a comma-separated list)
--archivePath to the archive file for the sink. It also supports url-path [http/https/file (file protocol assumes that file already exists on worker host)] from which worker can download the package.
--nameThe sink’s name
--namespaceThe sink’s namespace
--parallelismThe sink’s parallelism factor (i.e. the number of sink instances to run).
--processing-guaranteesThe processing guarantees (aka delivery semantics) applied to the sink. Available values: ATLEAST_ONCE, ATMOST_ONCE, EFFECTIVELY_ONCE.
--ramThe RAM (in bytes) that needs to be allocated per sink instance (applicable only to the Docker runtime)
--sink-configUser defined configs key/values
--sink-config-fileThe path to a YAML config file specifying the sink’s configuration
--sink-typeThe 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-patternTopicsPattern to consume from list of topics under a namespace that match the pattern. [--input] and [--topicsPattern] are mutually exclusive. Add SerDe class name for a pattern in --customSerdeInputs (supported for java fun only)
--tenantThe sink’s tenant
--auto-ackWhether or not the framework will automatically acknowledge messages
--retain-orderingSink consumes and sinks messages in order
--subs-namePulsar source subscription name if user wants a specific subscription-name for input-topic consumer
--timeout-msThe message timeout in milliseconds

delete‚Äč

Stops a Pulsar IO sink connector

Usage


$ pulsar-admin sinks delete options

Options

FlagDescriptionDefault
--nameThe sink's name
--namespaceThe sink's namespace
--tenantThe sink's tenant

list‚Äč

List all running Pulsar IO sink connectors

Usage


$ pulsar-admin sinks list options

Options

FlagDescriptionDefault
--namespaceThe sink's namespace
--tenantThe sink's tenant

get‚Äč

Gets the information about a Pulsar IO sink connector

Usage


$ pulsar-admin sinks get options

Options

FlagDescriptionDefault
--nameThe sink's name
--namespaceThe sink's namespace
--tenantThe sink's tenant

status‚Äč

Check the current status of a Pulsar Sink

Usage


$ pulsar-admin sinks status options

Options

FlagDescriptionDefault
--instance-idThe sink instanceId (Get-status of all instances if instance-id is not provided)
--nameThe sink's name
--namespaceThe sink's namespace
--tenantThe sink's tenant

stop‚Äč

Stops sink instance

Usage


$ pulsar-admin sinks stop options

Options

FlagDescriptionDefault
--instance-idThe sink instanceId (stop all instances if instance-id is not provided)
--nameThe sink's name
--namespaceThe sink's namespace
--tenantThe sink's tenant

start‚Äč

Starts sink instance

Usage


$ pulsar-admin sinks start options

Options

FlagDescriptionDefault
--instance-idThe sink instanceId (start all instances if instance-id is not provided)
--nameThe sink's name
--namespaceThe sink's namespace
--tenantThe sink's tenant

restart‚Äč

Restart sink instance

Usage


$ pulsar-admin sinks restart options

Options

FlagDescriptionDefault
--instance-idThe sink instanceId (restart all instances if instance-id is not provided)
--nameThe sink's name
--namespaceThe sink's namespace
--tenantThe sink's tenant

localrun‚Äč

Run a Pulsar IO sink connector locally (rather than deploying it to the Pulsar cluster)

Usage


$ pulsar-admin sinks localrun options

Options

FlagDescriptionDefault
--broker-service-urlThe URL for the Pulsar broker
--classnameThe sink's class name if archive is file-url-path (file://)
--cpuThe CPU (in cores) that needs to be allocated per sink instance (applicable only to the Docker runtime)
--custom-serde-inputsThe map of input topics to SerDe class names (as a JSON string)
--custom-schema-inputsThe map of input topics to Schema types or class names (as a JSON string)
--diskThe disk (in bytes) that needs to be allocated per sink instance (applicable only to the Docker runtime)
--inputsThe sink’s input topic(s) (multiple topics can be specified as a comma-separated list)
--archivePath to the archive file for the sink. It also supports url-path [http/https/file (file protocol assumes that file already exists on worker host)] from which worker can download the package.
--nameThe sink’s name
--namespaceThe sink’s namespace
--parallelismThe sink’s parallelism factor (i.e. the number of sink instances to run).
--processing-guaranteesThe processing guarantees (aka delivery semantics) applied to the sink. Available values: ATLEAST_ONCE, ATMOST_ONCE, EFFECTIVELY_ONCE.
--ramThe RAM (in bytes) that needs to be allocated per sink instance (applicable only to the Docker runtime)
--sink-configUser defined configs key/values
--sink-config-fileThe path to a YAML config file specifying the sink’s configuration
--sink-typeThe 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-patternTopicsPattern to consume from list of topics under a namespace that match the pattern. [--input] and [--topicsPattern] are mutually exclusive. Add SerDe class name for a pattern in --customSerdeInputs (supported for java fun only)
--tenantThe sink’s tenant
--auto-ackWhether or not the framework will automatically acknowledge messages
--timeout-msThe message timeout in milliseconds
--client-auth-paramsClient authentication param
--client-auth-pluginClient authentication plugin using which function-process can connect to broker
--hostname-verification-enabledEnable hostname verificationfalse
--retain-orderingSink consumes and sinks messages in order
--subs-namePulsar source subscription name if user wants a specific subscription-name for input-topic consumer
--tls-allow-insecureAllow insecure tls connectionfalse
--tls-trust-cert-pathThe tls trust cert file path
--use-tlsUse tls connectionfalse

available-sinks‚Äč

Get the list of Pulsar IO connector sinks supported by Pulsar cluster

Usage


$ pulsar-admin sinks available-sinks

sources‚Äč

An interface for managing Pulsar IO sources (ingress data into Pulsar)

Usage


$ pulsar-admin sources subcommand

Subcommands

  • create
  • update
  • delete
  • get
  • status
  • list
  • stop
  • start
  • restart
  • localrun
  • available-sources

create‚Äč

Submit a Pulsar IO source connector to run in a Pulsar cluster

Usage


$ pulsar-admin sources create options

Options

FlagDescriptionDefault
--classnameThe source's class name if archive is file-url-path (file://)
--cpuThe CPU (in cores) that needs to be allocated per source instance (applicable only to the Docker runtime)
--deserialization-classnameThe SerDe classname for the source
--destination-topic-nameThe Pulsar topic to which data is sent
--diskThe disk (in bytes) that needs to be allocated per source instance (applicable only to the Docker runtime)
--archiveThe path to the NAR archive for the Source. It also supports url-path [http/https/file (file protocol assumes that file already exists on worker host)] from which worker can download the package.
--nameThe source’s name
--namespaceThe source’s namespace
--parallelismThe source’s parallelism factor (i.e. the number of source instances to run).
--processing-guaranteesThe processing guarantees (aka delivery semantics) applied to the source. Available values: ATLEAST_ONCE, ATMOST_ONCE, EFFECTIVELY_ONCE.
--ramThe RAM (in bytes) that needs to be allocated per source instance (applicable only to the Docker runtime)
--schema-typeThe 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-typeOne of the built-in 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-configSource config key/values
--source-config-fileThe path to a YAML config file specifying the source’s configuration
--tenantThe source’s tenant

update‚Äč

Update a already submitted Pulsar IO source connector

Usage


$ pulsar-admin sources update options

Options

FlagDescriptionDefault
--classnameThe source's class name if archive is file-url-path (file://)
--cpuThe CPU (in cores) that needs to be allocated per source instance (applicable only to the Docker runtime)
--deserialization-classnameThe SerDe classname for the source
--destination-topic-nameThe Pulsar topic to which data is sent
--diskThe disk (in bytes) that needs to be allocated per source instance (applicable only to the Docker runtime)
--archiveThe path to the NAR archive for the Source. It also supports url-path [http/https/file (file protocol assumes that file already exists on worker host)] from which worker can download the package.
--nameThe source’s name
--namespaceThe source’s namespace
--parallelismThe source’s parallelism factor (i.e. the number of source instances to run).
--processing-guaranteesThe processing guarantees (aka delivery semantics) applied to the source. Available values: ATLEAST_ONCE, ATMOST_ONCE, EFFECTIVELY_ONCE.
--ramThe RAM (in bytes) that needs to be allocated per source instance (applicable only to the Docker runtime)
--schema-typeThe 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-typeOne of the built-in 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-configSource config key/values
--source-config-fileThe path to a YAML config file specifying the source’s configuration
--tenantThe source’s tenant

delete‚Äč

Stops a Pulsar IO source connector

Usage


$ pulsar-admin sources delete options

Options

FlagDescriptionDefault
--nameThe source's name
--namespaceThe source's namespace
--tenantThe source's tenant

get‚Äč

Gets the information about a Pulsar IO source connector

Usage


$ pulsar-admin sources get options

Options

FlagDescriptionDefault
--nameThe source's name
--namespaceThe source's namespace
--tenantThe source's tenant

status‚Äč

Check the current status of a Pulsar Source

Usage


$ pulsar-admin sources status options

Options

FlagDescriptionDefault
--instance-idThe source instanceId (Get-status of all instances if instance-id is not provided)
--nameThe source's name
--namespaceThe source's namespace
--tenantThe source's tenant

list‚Äč

List all running Pulsar IO source connectors

Usage


$ pulsar-admin sources list options

Options

FlagDescriptionDefault
--namespaceThe source's namespace
--tenantThe source's tenant

stop‚Äč

Stop source instance

Usage


$ pulsar-admin sources stop options

Options

FlagDescriptionDefault
--instance-idThe source instanceId (stop all instances if instance-id is not provided)
--nameThe source's name
--namespaceThe source's namespace
--tenantThe source's tenant

start‚Äč

Start source instance

Usage


$ pulsar-admin sources start options

Options

FlagDescriptionDefault
--instance-idThe source instanceId (start all instances if instance-id is not provided)
--nameThe source's name
--namespaceThe source's namespace
--tenantThe source's tenant

restart‚Äč

Restart source instance

Usage


$ pulsar-admin sources restart options

Options

FlagDescriptionDefault
--instance-idThe source instanceId (restart all instances if instance-id is not provided)
--nameThe source's name
--namespaceThe source's namespace
--tenantThe source's tenant

localrun‚Äč

Run a Pulsar IO source connector locally (rather than deploying it to the Pulsar cluster)

Usage


$ pulsar-admin sources localrun options

Options

FlagDescriptionDefault
--classnameThe source's class name if archive is file-url-path (file://)
--cpuThe CPU (in cores) that needs to be allocated per source instance (applicable only to the Docker runtime)
--deserialization-classnameThe SerDe classname for the source
--destination-topic-nameThe Pulsar topic to which data is sent
--diskThe disk (in bytes) that needs to be allocated per source instance (applicable only to the Docker runtime)
--archiveThe path to the NAR archive for the Source. It also supports url-path [http/https/file (file protocol assumes that file already exists on worker host)] from which worker can download the package.
--nameThe source’s name
--namespaceThe source’s namespace
--parallelismThe source’s parallelism factor (i.e. the number of source instances to run).
--processing-guaranteesThe processing guarantees (aka delivery semantics) applied to the source. Available values: ATLEAST_ONCE, ATMOST_ONCE, EFFECTIVELY_ONCE.
--ramThe RAM (in bytes) that needs to be allocated per source instance (applicable only to the Docker runtime)
--schema-typeThe 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-typeOne of the built-in 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-configSource config key/values
--source-config-fileThe path to a YAML config file specifying the source’s configuration
--tenantThe source’s tenant
--broker-service-urlThe URL for the Pulsar broker
--client-auth-paramsClient authentication param
--client-auth-pluginClient authentication plugin using which function-process can connect to broker
--hostname-verification-enabledEnable hostname verificationfalse
--tls-allow-insecureAllow insecure tls connectionfalse
--tls-trust-cert-pathThe tls trust cert file path
--use-tlsUse tls connection

available-sources‚Äč

Get the list of Pulsar IO connector sources supported by Pulsar cluster

Usage


$ pulsar-admin sources 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

FlagDescriptionDefault
-w, --wait-completeWait for compaction to completefalse

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

FlagDescriptionDefault
-s, --size-thresholdThe 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

FlagDescriptionDefault
-w, --wait-completeWait for compaction to completefalse

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

FlagDescriptionDefault
-p, --partitionsThe number of partitions for the topic0

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

FlagDescriptionDefault
-p, --partitionsThe number of partitions for the topic0

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

FlagDescriptionDefault
-b, --bundleThe 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

FlagDescriptionDefault
--actionsActions to be granted (produce or consume)
--roleThe 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

FlagDescriptionDefault
-s, --subscriptionThe 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

FlagDescriptionDefault
--per-partitionGet per-partition statsfalse

skip‚Äč

Skip some messages for the subscription

Usage


$ pulsar-admin topics skip topic options

Options

FlagDescriptionDefault
-n, --countThe number of messages to skip0
-s, --subscriptionThe subscription on which to skip messages

skip-all‚Äč

Skip all the messages for the subscription

Usage


$ pulsar-admin topics skip-all topic options

Options

FlagDescriptionDefault
-s, --subscriptionThe 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

FlagDescriptionDefault
-t, --expireTimeExpire messages older than the time (in seconds)0
-s, --subscriptionThe 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

FlagDescriptionDefault
-t, --expireTimeExpire 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

FlagDescriptionDefault
-n, --countThe number of messages0
-s, --subscriptionSubscription to get messages from

reset-cursor‚Äč

Reset position for subscription to closest to timestamp

Usage


$ pulsar-admin topics reset-cursor topic options

Options

FlagDescriptionDefault
-s, --subscriptionSubscription to reset position on
-t, --timeThe 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

FlagDescriptionDefault
-r, --admin-rolesComma-separated admin roles
-c, --allowed-clustersComma-separated allowed clusters

update‚Äč

Updates a tenant

Usage


$ pulsar-admin tenants update tenant-name options

Options

FlagDescriptionDefault
-r, --admin-rolesComma-separated admin roles
-c, --allowed-clustersComma-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

FlagDescriptionDefault
-b, --bundleA bundle of the form {start-boundary}_{end_boundary}. This must be specified together with -n/--namespace.
-n, --namespaceThe 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

FlagDescriptionDefault
-bi, --bandwidthInThe expected inbound bandwidth (in bytes/second)0
-bo, --bandwidthOutExpected outbound bandwidth (in bytes/second)0
-b, --bundleA bundle of the form {start-boundary}_{end_boundary}. This must be specified together with -n/--namespace.
-d, --dynamicAllow to be dynamically re-calculated (or not)false
-mem, --memoryExpectred memory usage (in megabytes)0
-mi, --msgRateInExpected incoming messages per second0
-mo, --msgRateOutExpected outgoing messages per second0
-n, --namespaceThe 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

FlagDescriptionDefault
-b, --bundleA bundle of the form {start-boundary}_{end_boundary}. This must be specified together with -n/--namespace.
-n, --namespaceThe 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

FlagDescriptionDefault
--filenameThe 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

FlagDescriptionDefault
--versionThe 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

FlagDescriptionDefault
-c, --classnameThe Java class name
-j, --jarA path to the JAR file which contains the above Java class
-t, --typeThe type of the schema (avro or json)