GETTING STARTED

This section contains the most basic commands for getting a workload running on your cluster.


clusters

Usage

$ clusters


add

Provisions a new cluster

pulsarctl clusters create (cluster-name)

Used For

This command is used for adding the configuration data for a cluster. The configuration data is mainly used for geo-replication between clusters, so please make sure the service urls provided in this command are reachable between clusters. This operation requires Pulsar super-user privileges.

Required Permission

This command requires super-user permissions.

Output

//normal output

Cluster (cluster-name) added

Usage

$ add

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. broker-url | | | Pulsar cluster broker service url, e.g. pulsar://example.pulsar.io:6650 broker-url-tls | | | Pulsar cluster tls secured broker service url, e.g. pulsar+ssl://example.pulsar.io:6651 output | o | text | The output format (text,json,yaml) peer-cluster | p | [] | Cluster to be registered as a peer-cluster of this cluster. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication url | | | Pulsar cluster web service url, e.g. http://example.pulsar.io:8080 url-tls | | | Pulsar cluster tls secured web service url, e.g. https://example.pulsar.io:8443


create-failure-domain

create the failure domain

pulsarctl clusters create-failure-domain (cluster-name) (domain-name)

create the failure domain with brokers

pulsarctl clusters create-failure-domain -b (broker-ip):(broker-port) -b (broker-ip):(broker-port) (cluster-name) (domain-name)

Used For

This command is used for creating a failure domain of the (cluster-name).

Required Permission

This command requires super-user permissions.

Output

//normal output

Create failure domain (domain-name) for cluster (cluster-name) succeed

//the args need to be specified as (cluster-name) (domain-name)

[✖] need specified two names for cluster and failure domain

//the specified cluster does not exist in the broker

[✖] code: 412 reason: Cluster (cluster-name) does not exist.

Usage

$ create-failure-domain

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. brokers | b | [] | Set the failure domain clusters output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


delete

deleting the cluster named (cluster-name)

pulsarctl clusters delete (cluster-name)

Used For

This command is used for deleting an existing cluster.

Required Permission

This command requires super-user permissions.

Output

//normal output

Cluster (cluster-name) delete successfully.

//the cluster name is not specified or the cluster name is specified more than one

[✖] the cluster name is not specified or the cluster name is specified more than one

//the specified cluster does not exist in the broker

[✖] code: 412 reason: Cluster (cluster-name) does not exist.

Usage

$ delete

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


delete-failure-domain

delete the failure domain

pulsarctl clusters delete-failure-domain (cluster-name) (domain-name)

Used For

This command is used for deleting the failure domain (domain-name) of the cluster (cluster-name)

Required Permission

This command requires super-user permissions.

Output

//output example

Delete failure domain [(domain-name)] for cluster [(cluster-name)] succeed

//the cluster name and(or) failure domain name is not specified or the name is specified more than one

[✖] need to specified the cluster name and the failure domain name

//the specified failure domain is not exist

code: 404 reason: Domain-name non-existent-failure-domain or cluster standalone does not exist

//the specified cluster is not exist

code: 412 reason: Cluster non-existent-cluster does not exist.

Usage

$ delete-failure-domain

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


get

getting the (cluster-name) data

pulsarctl clusters get (cluster-name)

Used For

This command is used for getting the cluster data of the specified cluster.

Required Permission

This command requires super-user permissions.

Output

//normal output

{

"serviceUrl": "http://localhost:8080",

"serviceUrlTls": "",

"brokerServiceUrl": "pulsar://localhost:6650",

"brokerServiceUrlTls": "",

"peerClusterNames": null

}

//the cluster name is not specified or the cluster name is specified more than one

[✖] the cluster name is not specified or the cluster name is specified more than one

//the specified cluster does not exist in the broker

[✖] code: 412 reason: Cluster (cluster-name) does not exist.

Usage

$ get

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


get-failure-domain

getting the broker list in the (cluster-name) cluster failure domain (domain-name)

pulsarctl clusters get-failure-domain (cluster-name) (domain-name)

Used For

This command is used for getting the specified failure domain on the specified cluster.

Required Permission

This command requires super-user permissions.

Output

//output example

{

"brokers" : [

"failure-broker-A",

"failure-broker-B",

]

}

//the cluster name and(or) failure domain name is not specified or the name is specified more than one

[✖] need to specified the cluster name and the failure domain name

//the specified cluster does not exist in the broker

[✖] code: 412 reason: Cluster (cluster-name) does not exist.

Usage

$ get-failure-domain

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


get-peer-clusters

getting the (cluster-name) peer clusters

pulsarctl clusters get-peer-clusters (cluster-name)

Used For

This command is used for getting the peer clusters of the specified cluster.

Required Permission

This command requires super-user permissions.

Output

//normal output

+-------------------+

| PEER CLUSTERS |

+-------------------+

| test_peer_cluster |

+-------------------+

//the cluster name is not specified or the cluster name is specified more than one

[✖] the cluster name is not specified or the cluster name is specified more than one

//the specified cluster does not exist in the broker

[✖] code: 412 reason: Cluster (cluster-name) does not exist.

Usage

$ get-peer-clusters

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


list

List the existing clusters

pulsarctl clusters list

This command is used for listing the list of available pulsar clusters.

Usage

$ list

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


list-failure-domains

listing all the failure domains under the specified cluster

pulsarctl clusters list-failure-domains (cluster-name)

Used For

This command is used for getting all failure domain under the cluster (cluster-name).

Required Permission

This command requires super-user permissions.

Output

//output example

{

"failure-domain": {

"brokers": [

"failure-broker-A",

"failure-broker-B"

]

}

}

//the cluster name is not specified or the cluster name is specified more than one

[✖] the cluster name is not specified or the cluster name is specified more than one

//the specified cluster does not exist in the broker

[✖] code: 412 reason: Cluster (cluster-name) does not exist.

Usage

$ list-failure-domains

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


update

updating the web service url of the (cluster-name)

pulsarctl clusters update --url http://example:8080 (cluster-name)

updating the tls secured web service url of the (cluster-name)

pulsarctl clusters update --url-tls https://example:8080 (cluster-name)

updating the broker service url of the (cluster-name)

pulsarctl clusters update --broker-url pulsar://example:6650 (cluster-name)

updating the tls secured web service url of the (cluster-name)

pulsarctl clusters update --broker-url-tls pulsar+ssl://example:6650 (cluster-name)

registered as a peer-cluster of the (cluster-name) clusters

pulsarctl clusters update -p (cluster-a) -p (cluster-b) (cluster)

Used For

This command is used for updating the cluster data of the specified cluster.

Required Permission

This command requires super-user permissions.

Output

//normal output

Cluster (cluster-name) updated

//the cluster name is not specified or the cluster name is specified more than one

[✖] the cluster name is not specified or the cluster name is specified more than one

//the specified cluster does not exist in the broker

[✖] code: 412 reason: Cluster (cluster-name) does not exist.

Usage

$ update

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. broker-url | | | Pulsar cluster broker service url, e.g. pulsar://example.pulsar.io:6650 broker-url-tls | | | Pulsar cluster tls secured broker service url, e.g. pulsar+ssl://example.pulsar.io:6651 output | o | text | The output format (text,json,yaml) peer-cluster | p | [] | Cluster to be registered as a peer-cluster of this cluster. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication url | | | Pulsar cluster web service url, e.g. http://example.pulsar.io:8080 url-tls | | | Pulsar cluster tls secured web service url, e.g. https://example.pulsar.io:8443


update-failure-domain

update the failure domain

pulsarctl clusters update-failure-domain (cluster-name) (domain-name)

update the failure domain with brokers

pulsarctl clusters update-failure-domain --broker-list <cluster-A> --broker-list (cluster-B) (cluster-name) (domain-name)

Used For

This command is used for updating a failure domain of the (cluster-name).

Required Permission

This command requires super-user permissions.

Output

//normal output

Update failure domain (domain-name) for cluster (cluster-name) succeed

//the args need to be specified as (cluster-name) (domain-name)

[✖] need specified two names for cluster and failure domain

//the specified cluster does not exist in the broker

[✖] code: 412 reason: Cluster (cluster-name) does not exist.

Usage

$ update-failure-domain

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. broker-list | b | [] | Set the failure domain clusters output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


update-peer-clusters

updating the peer clusters

pulsarctl clusters update-peer-clusters -p cluster-a -p cluster-b (cluster-name)

Used For

This command is used for updating peer clusters.

Required Permission

This command requires super-user permissions.

Output

//output example

(cluster-name) peer clusters updated

//the cluster name is not specified or the cluster name is specified more than one

[✖] the cluster name is not specified or the cluster name is specified more than one

//the specified cluster does not exist in the broker

[✖] code: 412 reason: Cluster (cluster-name) does not exist.

Usage

$ update-peer-clusters

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) peer-cluster | p | [] | Cluster to be registered as a peer-cluster of this cluster tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


completion

Usage

$ completion


bash

To load completion run

. <(pulsarctl completion bash)

To configure your bash shell to load completions for each session add to your bashrc

// ~/.bashrc or ~/.profile

. <(pulsarctl completion bash)

If you are stuck on Bash 3 (macOS) use

source /dev/stdin <<<"$(pulsarctl completion bash)"

Usage

$ bash


zsh

To configure your zsh shell, run:

mkdir -p ~/.zsh/completion/

pulsarctl completion zsh > ~/.zsh/completion/_pulsarctl

// Include the directory in your $fpath, for example by adding in ~/.zshrc:

fpath=($fpath ~/.zsh/completion)

// You may have to force rebuild zcompdump:

rm -f ~/.zcompdump; compinit

Usage

$ zsh


functions

Usage

$ functions


create

Create a Pulsar Function in cluster mode with jar file

pulsarctl functions create
--tenant public
--namespace default
--name (the name of Pulsar Functions>)
--inputs test-input-topic
--output persistent://public/default/test-output-topic
--classname org.apache.pulsar.functions.api.examples.ExclamationFunction
--jar /examples/api-examples.jar

Create a Pulsar Function use function config yaml file

pulsarctl functions create
--function-config-file (the path of function config yaml file)
--jar (the path of user code jar)

Create a Pulsar Function in cluster mode with pkg URL

pulsarctl functions create
--tenant public
--namespace default
--name (the name of Pulsar Functions)
--inputs test-input-topic
--output persistent://public/default/test-output-topic
--classname org.apache.pulsar.functions.api.examples.ExclamationFunction
--jar file:/http: + /examples/api-examples.jar

Create a Pulsar Function in cluster mode with log topic

pulsarctl functions create
--log-topic persistent://public/default/test-log-topic
// Other function parameters

Create a Pulsar Function in cluster mode with dead letter topic

pulsarctl functions create
--dead-letter-topic persistent://public/default/test-dead-letter-topic
--max-message-retries 10
// Other function parameters

Create a Pulsar Function in cluster mode with auto ack

pulsarctl functions create
--auto-ack
// Other function parameters

Create a Pulsar Function in cluster mode with FQFN

pulsarctl functions create
--fqfn tenant/namespace/name eg:public/default/test-fqfn-function
// Other function parameters

Create a Pulsar Function in cluster mode with topics pattern

pulsarctl functions create
--topics-pattern persistent://tenant/ns/topicPattern*
// Other function parameters

Create a Pulsar Function in cluster mode with user config

pulsarctl functions create
--user-config "{"publishTopic":"publishTopic", "key":"pulsar"}"
// Other function parameters

Create a Pulsar Function in cluster mode with retain ordering

pulsarctl functions create
--retain-ordering
// Other function parameters

Create a Pulsar Function in cluster mode with custom schema for inputs topic

pulsarctl functions create
--custom-schema-inputs "{"topic-1":"schema.STRING", "topic-2":"schema.JSON"}"
// Other function parameters

Create a Pulsar Function in cluster mode with schema type for output topic

pulsarctl functions create
--schema-type schema.STRING
// Other function parameters

Create a Pulsar Function in cluster mode with parallelism

pulsarctl functions create
--parallelism 1
// Other function parameters

Create a Pulsar Function in cluster mode with resource

pulsarctl functions create
--ram 5656565656
--disk 8080808080808080
--cpu 5.0
// Other function parameters

Create a Pulsar Function in cluster mode with window functions

pulsarctl functions create
--window-length-count 10
--window-length-duration-ms 1000
--sliding-interval-count 3
--sliding-interval-duration-ms 1000
// Other function parameters

Used For

This command is used for creating a new Pulsar Function in cluster mode.

Required Permission

This command requires super-user permissions.

Output

//normal output

Created (the name of a Pulsar Function) successfully

Usage

$ create

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" auto-ack | | true | Whether or not the framework acknowledges messages automatically bookie-service-url | | | The bookie web service url that pulsarctl connects to. classname | | | The class name of a Pulsar Function cpu | | 0 | The cpu in cores that need to be allocated per function instance(applicable only to docker runtime) custom-schema-inputs | | | The map of input topics to Schema class names (as a JSON string) custom-serde-inputs | | | The map of input topics to SerDe class names (as a JSON string) dead-letter-topic | | | The topic where messages that are not processed successfully are sent to disk | | 0 | The disk in bytes that need to be allocated per function instance(applicable only to docker runtime) fqfn | | | The Fully Qualified Function Name (FQFN) for the function function-config-file | | | The path to a YAML config file that specifies the configuration of a Pulsar Function go | | | Path to the main Go executable binary for the function (if the function is written in Go) 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. inputs | i | | The input topic or topics (multiple topics can be specified as a comma-separated list) of a Pulsar Function jar | | | Path 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. log-topic | | | The topic to which the logs of a Pulsar Function are produced max-message-retries | | 0 | How many times should we try to process a message before giving up name | | | The name of a Pulsar Function namespace | | | The namespace of a Pulsar Function output | o | | The output topic of a Pulsar Function (If none is specified, no output is written) output-serde-classname | | | The SerDe class to be used for messages output by the function parallelism | | 0 | The parallelism factor of a Pulsar Function (i.e. the number of function instances to run) processing-guarantees | | | The processing guarantees (aka delivery semantics) applied to the function py | | | Path to the main Python file/Python Wheel file for the function (if the function is written in Python) 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. ram | | 0 | The ram in bytes that need to be allocated per function instance(applicable only to process/docker runtime) retain-ordering | | false | Function consumes and processes messages in order schema-type | t | | The builtin schema type or custom schema class name to be used for messages output by the function sliding-interval-count | | 0 | The number of messages after which the window slides sliding-interval-duration-ms | | 0 | The time duration after which the window slides subs-name | | | Pulsar source subscription name if user wants a specific subscription-name for input-topic consumer tenant | | | The tenant of a Pulsar Function timeout-ms | | 0 | The message timeout in milliseconds tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication topics-pattern | | | The 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-config | | | User-defined config key/values window-length-count | | 0 | The number of messages per window window-length-duration-ms | | 0 | The time duration of the window in milliseconds


delete

Delete a Pulsar Function that is running on a Pulsar cluster

pulsarctl functions delete
--tenant public
--namespace default
--name (the name of Pulsar Functions)

Delete a Pulsar Function that is running on a Pulsar cluster with instance ID

pulsarctl functions delete
--tenant public
--namespace default
--name (the name of Pulsar Functions)
--instance-id 1

Delete a Pulsar Function that is running on a Pulsar cluster with FQFN

pulsarctl functions delete
--fqfn tenant/namespace/name [eg: public/default/ExampleFunctions]

Used For

This command is used for delete a Pulsar Function that is running on a Pulsar cluster.

Required Permission

This command requires super-user permissions.

Output

//normal output

Deleted successfully

//You must specify a name for the Pulsar Functions or a FQFN, please check the --name args

[✖] you must specify a name for the function or a Fully Qualified Function Name (FQFN)

//The name of Pulsar Functions doesn't exist, please check the --name args

[✖] code: 404 reason: Function doesn't exist

Usage

$ delete

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. fqfn | | | The Fully Qualified Function Name (FQFN) for the function name | | | The name of a Pulsar Function namespace | | | The namespace of a Pulsar Function output | o | text | The output format (text,json,yaml) tenant | | | The tenant of a Pulsar Function tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


download

Download File Data from Pulsar

pulsarctl functions download
--destination-file public
--path default

Download File Data from Pulsar

pulsarctl functions download
--destination-file public
--tenant public
--namespace default
--name <function-name>

Used For

This command is used for download File Data from Pulsar.

Required Permission

This command requires super-user permissions.

Output

//normal output

Downloaded successfully

//You must specify a name for the Pulsar Functions or a FQFN, please check the --name args

[✖] you must specify a name for the function or a Fully Qualified Function Name (FQFN)

Usage

$ download

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. destination-file | | | The file to store downloaded content fqfn | | | The Fully Qualified Function Name (FQFN) for the function name | | | Function name namespace | | | Namespace name output | o | text | The output format (text,json,yaml) path | | | Path to store the content tenant | | | Tenant name tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


get

Fetch information about a Pulsar Function

pulsarctl functions get
--tenant public
--namespace default
--name (the name of Pulsar Function)

Fetch information about a Pulsar Function with FQFN

pulsarctl functions get
--fqfn tenant/namespace/name [eg: public/default/ExampleFunctions]

Used For

Fetch information about a Pulsar Function

Required Permission

This command requires super-user permissions.

Output

//normal output

{

"tenant": "public",

"namespace": "default",

"name": "test-functions",

"className": "org.apache.pulsar.functions.api.examples.ExclamationFunction",

"inputSpecs": {

"persistent://public/default/test-topic-1": {

"isRegexPattern": false

}

},

"output": "persistent://public/default/test-topic-2",

"processingGuarantees": "ATLEAST_ONCE",

"retainOrdering": false,

"userConfig": {},

"runtime": "JAVA",

"autoAck": true,

"parallelism": 1,

"resources": {

"cpu": 1.0,

"ram": 1073741824,

"disk": 10737418240

},

"cleanupSubscription": true

}

//You must specify a name for the Pulsar Functions or a FQFN, please check the --name args

[✖] you must specify a name for the function or a Fully Qualified Function Name (FQFN)

//The name of Pulsar Functions doesn't exist, please check the --name args

[✖] code: 404 reason: Function (your function name) doesn't exist

Usage

$ get

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. fqfn | | | The Fully Qualified Function Name (FQFN) for the function name | | | The name of a Pulsar Function namespace | | | The namespace of a Pulsar Function output | o | text | The output format (text,json,yaml) tenant | | | The tenant of a Pulsar Function tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


list

List all Pulsar Functions running under a specific tenant and namespace

pulsarctl functions list
--tenant public
--namespace default

Used For

List all Pulsar Functions running under a specific tenant and namespace.

Required Permission

This command requires super-user permissions.

Output

//normal output

+--------------------+

| Function Name |

+--------------------+

| test_function_name |

+--------------------+

Usage

$ list

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. namespace | | | The namespace of a Pulsar Function output | o | text | The output format (text,json,yaml) tenant | | | The tenant of a Pulsar Function tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


putstate

Put a key/(string value) pair to the state associated with a Pulsar Function

pulsarctl functions putstate
--tenant public
--namespace default
--name (the name of Pulsar Function)
(key name) - (string value)

Put a key/(file path) pair to the state associated with a Pulsar Function

pulsarctl functions putstate
--tenant public
--namespace default
--name (the name of Pulsar Function)
(key name) = (file path)

Put a key/value pair to the state associated with a Pulsar Function with FQFN

pulsarctl functions putstate
--fqfn tenant/namespace/name [eg: public/default/ExampleFunctions]
(key name) - (string value)

Used For

Put a key/value pair to the state associated with a Pulsar Function.

Required Permission

This command requires namespace function permissions.

Output

//normal output

Put state (the function state) successfully

//You must specify a name for the Pulsar Functions or a FQFN, please check the --name args

[✖] you must specify a name for the function or a Fully Qualified Function Name (FQFN)

//The name of Pulsar Functions doesn't exist, please check the --name arg

[✖] code: 404 reason: Function (your function name) doesn't exist

//The state key and state value not specified, please check your input format

[✖] need to specified the state key and state value

//The format of the input is incorrect, please check.

[✖] error input format

Usage

$ putstate

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. fqfn | | | The Fully Qualified Function Name (FQFN) for the function name | | | The name of a Pulsar Function namespace | | | The namespace of a Pulsar Function output | o | text | The output format (text,json,yaml) tenant | | | The tenant of a Pulsar Function tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


querystate

Fetch the current state associated with a Pulsar Function

pulsarctl functions querystate
--tenant public
--namespace default
--name (the name of Pulsar Function)
--key (the name of key)
--watch

Fetch a key/value pair from the state associated with a Pulsar Function with FQFN

pulsarctl functions querystate
--fqfn tenant/namespace/name [eg: public/default/ExampleFunctions]
--key (the name of key)
--watch

Fetch a key/value pair from the state associated with a Pulsar Function

pulsarctl functions querystate
--tenant public
--namespace default
--name (the name of Pulsar Function)
--key (the name of key)

Used For

Fetch a key/value pair from the state associated with a Pulsar Function.

Required Permission

This command requires namespace function permissions.

Output

//normal output

{

"key": "pulsar",

"stringValue": "hello",

"byteValue": null,

"numberValue": 0,

"version": 6

}

//You must specify a name for the Pulsar Functions or a FQFN, please check the --name args

[✖] you must specify a name for the function or a Fully Qualified Function Name (FQFN)

//The name of Pulsar Functions doesn't exist, please check the --name args

[✖] code: 404 reason: Function doesn't exist

//key doesn't exist, please check --key args

error: key doesn't exist

Usage

$ querystate

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. fqfn | | | The Fully Qualified Function Name (FQFN) for the function key | k | | key name | | | The name of a Pulsar Function namespace | | | The namespace of a Pulsar Function output | o | text | The output format (text,json,yaml) tenant | | | The tenant of a Pulsar Function tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication watch | w | false | Watch for changes in the value associated with a key for a Pulsar Function


restart

Restart function instance

pulsarctl functions restart
--tenant public
--namespace default
--name (the name of Pulsar Function)

Restart function instance with instance ID

pulsarctl functions restart
--tenant public
--namespace default
--name (the name of Pulsar Function)
--instance-id 1

Restart function instance with FQFN

pulsarctl functions restart
--fqfn tenant/namespace/name [eg: public/default/ExampleFunctions]

Used For

This command is used for restarting function instance.

Required Permission

This command requires super-user permissions.

Output

//normal output

Restarted (the name of a Pulsar Function) successfully

//You must specify a name for the Pulsar Functions or a FQFN, please check the --name args

[✖] you must specify a name for the function or a Fully Qualified Function Name (FQFN)

//The name of Pulsar Functions doesn't exist, please check the --name args

[✖] code: 404 reason: Function (your function name) doesn't exist

//Used an instanceID that does not exist or other impermissible actions

[✖] code: 400 reason: Operation not permitted

Usage

$ restart

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. fqfn | | | The Fully Qualified Function Name (FQFN) for the function instance-id | | | The function instanceId (restart all instances if instance-id is not provided) name | | | The name of a Pulsar Function namespace | | | The namespace of a Pulsar Function output | o | text | The output format (text,json,yaml) tenant | | | The tenant of a Pulsar Function tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


start

Starts a stopped function instance

pulsarctl functions start
--tenant public
--namespace default
--name (the name of Pulsar Function)

Starts a stopped function instance with instance ID

pulsarctl functions start
--tenant public
--namespace default
--name (the name of Pulsar Function)
--instance-id 1

Starts a stopped function instance with FQFN

pulsarctl functions start
--fqfn tenant/namespace/name [eg: public/default/ExampleFunctions]

Used For

This command is used for starting a stopped function instance.

Required Permission

This command requires super-user permissions.

Output

//normal output

Started successfully

//You must specify a name for the Pulsar Functions or a FQFN, please check the --name args

[✖] you must specify a name for the function or a Fully Qualified Function Name (FQFN)

//The name of Pulsar Functions doesn't exist, please check the --name args

[✖] code: 404 reason: Function doesn't exist

//Used an instanceID that does not exist or other impermissible actions

[✖] code: 400 reason: Operation not permitted

Usage

$ start

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. fqfn | | | The Fully Qualified Function Name (FQFN) for the function instance-id | | | The function instanceId (start all instances if instance-id is not provided) name | | | The name of a Pulsar Function namespace | | | The namespace of a Pulsar Function output | o | text | The output format (text,json,yaml) tenant | | | The tenant of a Pulsar Function tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


stats

Get the current stats of a Pulsar Function

pulsarctl functions stats
--tenant public
--namespace default
--name (the name of Pulsar Function)

Get the current stats of a Pulsar Function with FQFN

pulsarctl functions stats
--fqfn tenant/namespace/name [eg: public/default/ExampleFunctions]

Used For

Get the current stats of a Pulsar Function.

Required Permission

This command requires namespace function permissions.

Output

//normal output

{

"receivedTotal": 0,

"processedSuccessfullyTotal": 0,

"systemExceptionsTotal": 0,

"userExceptionsTotal": 0,

"avgProcessLatency": 0,

"lastInvocation": 0,

"oneMin": {

"receivedTotal": 0,

"processedSuccessfullyTotal": 0,

"systemExceptionsTotal": 0,

"userExceptionsTotal": 0,

"avgProcessLatency": 0

},

"instances": [

{

"receivedTotal": 0,

"processedSuccessfullyTotal": 0,

"systemExceptionsTotal": 0,

"userExceptionsTotal": 0,

"avgProcessLatency": 0,

"instanceId": 0,

"metrics": {

"oneMin": {

"receivedTotal": 0,

"processedSuccessfullyTotal": 0,

"systemExceptionsTotal": 0,

"userExceptionsTotal": 0,

"avgProcessLatency": 0

},

"lastInvocation": 0,

"userMetrics": {},

"receivedTotal": 0,

"processedSuccessfullyTotal": 0,

"systemExceptionsTotal": 0,

"userExceptionsTotal": 0,

"avgProcessLatency": 0

}

}

],

"instanceId": 0,

"metrics": {

"oneMin": {

"receivedTotal": 0,

"processedSuccessfullyTotal": 0,

"systemExceptionsTotal": 0,

"userExceptionsTotal": 0,

"avgProcessLatency": 0

},

"lastInvocation": 0,

"userMetrics": null,

"receivedTotal": 0,

"processedSuccessfullyTotal": 0,

"systemExceptionsTotal": 0,

"userExceptionsTotal": 0,

"avgProcessLatency": 0

}

}

//You must specify a name for the Pulsar Functions or a FQFN, please check the --name args

[✖] you must specify a name for the function or a Fully Qualified Function Name (FQFN)

//The name of Pulsar Functions doesn't exist, please check the --name args

[✖] code: 404 reason: Function (your function name) doesn't exist

Usage

$ stats

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. fqfn | | | The Fully Qualified Function Name (FQFN) for the function instance-id | | | The function instanceId (Get-stats of all instances if instance-id is not provided) name | | | The name of a Pulsar Function namespace | | | The namespace of a Pulsar Function output | o | text | The output format (text,json,yaml) tenant | | | The tenant of a Pulsar Function tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


status

Check the current status of a Pulsar Function

pulsarctl functions status
--tenant public
--namespace default
--name (the name of Pulsar Function)

Check the current status of a Pulsar Function with FQFN

pulsarctl functions status
--fqfn tenant/namespace/name [eg: public/default/ExampleFunctions]

Used For

Check the current status of a Pulsar Function.

Required Permission

This command requires namespace function permissions.

Output

//normal output

{

"numInstances": 1,

"numRunning": 1,

"instances": [

{

"instanceId": 0,

"status": {

"running": true,

"error": "",

"numRestarts": 0,

"numReceived": 0,

"numSuccessfullyProcessed": 0,

"numUserExceptions": 0,

"latestUserExceptions": [],

"numSystemExceptions": 0,

"latestSystemExceptions": [],

"averageLatency": 0,

"lastInvocationTime": 0,

"workerId": "c-standalone-fw-127.0.0.1-8080"

}

}

]

}

//You must specify a name for the Pulsar Functions or a FQFN, please check the --name args

[✖] you must specify a name for the function or a Fully Qualified Function Name (FQFN)

//The name of Pulsar Functions doesn't exist, please check the --name args

[✖] code: 404 reason: Function (your function name) doesn't exist

//Used an instanceID that does not exist or other impermissible actions

[✖] code: 400 reason: Operation not permitted

Usage

$ status

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. fqfn | | | The Fully Qualified Function Name (FQFN) for the function instance-id | | | The function instanceId (Get-status of all instances if instance-id is not provided) name | | | The name of a Pulsar Function namespace | | | The namespace of a Pulsar Function output | o | text | The output format (text,json,yaml) tenant | | | The tenant of a Pulsar Function tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


stop

Stops function instance

pulsarctl functions stop
--tenant public
--namespace default
--name (the name of Pulsar Function)

Stops function instance with instance ID

pulsarctl functions stop
--tenant public
--namespace default
--name (the name of Pulsar Function)
--instance-id 1

Stops function instance with FQFN

pulsarctl functions stop
--fqfn tenant/namespace/name [eg: public/default/ExampleFunctions]

Used For

This command is used for stopping function instance.

Required Permission

This command requires super-user permissions.

Output

//normal output

Stopped (the name of a Pulsar Function) successfully

//You must specify a name for the Pulsar Functions or a FQFN, please check the --name args

[✖] you must specify a name for the function or a Fully Qualified Function Name (FQFN)

//The name of Pulsar Functions doesn't exist, please check the --name args

[✖] code: 404 reason: Function (your function name) doesn't exist

//Used an instanceID that does not exist or other impermissible actions

[✖] code: 400 reason: Operation not permitted

Usage

$ stop

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. fqfn | | | The Fully Qualified Function Name (FQFN) for the function instance-id | | | The function instanceId (stop all instances if instance-id is not provided) name | | | The name of a Pulsar Function namespace | | | The namespace of a Pulsar Function tenant | | | The tenant of a Pulsar Function tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


trigger

Trigger the specified Pulsar Function with a supplied value

pulsarctl functions trigger
--tenant public
--namespace default
--name (the name of Pulsar Function)
--topic (the name of input topic)
--trigger-value "hello pulsar"

Trigger the specified Pulsar Function with a supplied value

pulsarctl functions trigger
--fqfn tenant/namespace/name [eg: public/default/ExampleFunctions]
--topic (the name of input topic)
--trigger-value "hello pulsar"

Trigger the specified Pulsar Function with a supplied value

pulsarctl functions trigger
--tenant public
--namespace default
--name (the name of Pulsar Function)
--topic (the name of input topic)
--trigger-file (the path of trigger file)

Used For

Trigger the specified Pulsar Function with a supplied value.

Required Permission

This command requires namespace function permissions.

Output

//You must specify a name for the Pulsar Functions or a FQFN, please check the --name args

[✖] you must specify a name for the function or a Fully Qualified Function Name (FQFN)

//The name of Pulsar Functions doesn't exist, please check the --name args

[✖] code: 404 reason: Function (your function name) doesn't exist

//Used an instanceID that does not exist or other impermissible actions

[✖] code: 400 reason: Operation not permitted

//Function in trigger function has unidentified topic

[✖] code: 400 reason: Function in trigger function has unidentified topic

//Request Timed Out

[✖] code: 408 reason: Request Timed Out

Usage

$ trigger

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. fqfn | | | The Fully Qualified Function Name (FQFN) for the function name | | | The name of a Pulsar Function namespace | | | The namespace of a Pulsar Function tenant | | | The tenant of a Pulsar Function tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication topic | | | The specific topic name that the function consumes from that you want to inject the data to trigger-file | | | The path to the file that contains the data with which you want to trigger the function trigger-value | | | The value with which you want to trigger the function


update

Change the output topic of a Pulsar Function

pulsarctl functions update
--tenant public
--namespace default
--name update-function
--output test-output-topic

Update a Pulsar Function using a function config yaml file

pulsarctl functions update
--function-config-file (the path of function config yaml file)
--jar (the path of user code jar)

Change the log topic of a Pulsar Function

pulsarctl functions update
--log-topic persistent://public/default/test-log-topic
// Other function parameters

Change the dead letter topic of a Pulsar Function

pulsarctl functions update
--dead-letter-topic persistent://public/default/test-dead-letter-topic
--max-message-retries 10
// Other function parameters

Update the user configs of a Pulsar Function

pulsarctl functions update
--user-config "{"publishTopic":"publishTopic", "key":"pulsar"}"
// Other function parameters

Change the schemas of the input topics for a Pulsar Function

pulsarctl functions update
--custom-schema-inputs "{"topic-1":"schema.STRING", "topic-2":"schema.JSON"}"
// Other function parameters

Change the schema type of the input topic for a Pulsar Function

pulsarctl functions update
--schema-type schema.STRING
// Other function parameters

Change the parallelism of a Pulsar Function

pulsarctl functions update
--parallelism 1
// Other function parameters

Change the resource usage for a Pulsar Function

pulsarctl functions update
--ram 5656565656
--disk 8080808080808080
--cpu 5.0
// Other function parameters

Update the window configurations for a Pulsar Function

pulsarctl functions update
--window-length-count 10
--window-length-duration-ms 1000
--sliding-interval-count 3
--sliding-interval-duration-ms 1000
// Other function parameters

Used For

Update a Pulsar Function that has been deployed to a Pulsar cluster.

Required Permission

This command requires super-user permissions.

Output

//normal output

Updated (the name of a Pulsar Function) successfully

//Update contains no change

[✖] code: 400 reason: Update contains no change

//The name of Pulsar Functions doesn't exist, please check the --name args

[✖] code: 404 reason: Function (your function name) doesn't exist

Usage

$ update

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. classname | | | The class name of a Pulsar Function cpu | | 0 | The cpu in cores that need to be allocated per function instance(applicable only to docker runtime) custom-schema-inputs | | | The map of input topics to Schema class names (as a JSON string) custom-serde-inputs | | | The map of input topics to SerDe class names (as a JSON string) dead-letter-topic | | | The topic where messages that are not processed successfully are sent to disk | | 0 | The disk in bytes that need to be allocated per function instance(applicable only to docker runtime) fqfn | | | The Fully Qualified Function Name (FQFN) for the function function-config-file | | | The path to a YAML config file that specifies the configuration of a Pulsar Function go | | | Path to the main Go executable binary for the function (if the function is written in Go) inputs | | | The input topic or topics (multiple topics can be specified as a comma-separated list) of a Pulsar Function jar | | | Path 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. log-topic | | | The topic to which the logs of a Pulsar Function are produced max-message-retries | | 0 | How many times should we try to process a message before giving up name | | | The name of a Pulsar Function namespace | | | The namespace of a Pulsar Function output | o | | The output topic of a Pulsar Function (If none is specified, no output is written) output-serde-classname | | | The SerDe class to be used for messages output by the function parallelism | | 0 | The parallelism factor of a Pulsar Function (i.e. the number of function instances to run) py | | | Path to the main Python file/Python Wheel file for the function (if the function is written in Python) ram | | 0 | The ram in bytes that need to be allocated per function instance(applicable only to process/docker runtime) schema-type | t | | The builtin schema type or custom schema class name to be used for messages output by the function sliding-interval-count | | 0 | The number of messages after which the window slides sliding-interval-duration-ms | | 0 | The time duration after which the window slides tenant | | | The tenant of a Pulsar Function timeout-ms | | 0 | The message timeout in milliseconds tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication topics-pattern | | | The 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) update-auth-data | | false | Whether or not to update the auth data user-config | | | User-defined config key/values window-length-count | | 0 | The number of messages per window window-length-duration-ms | | 0 | The time duration of the window in milliseconds


upload

Upload a local file to Pulsar

pulsarctl functions upload --source-file <file-path> --path public/default/test

Used For

This command is used for uploading a local file to Pulsar.

Required Permission

This command requires super-user permission.

Output

Usage

$ upload

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. path | | | Path where the contents will to be stored source-file | | | The file whose content will be uploaded tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


namespaces

Usage

$ namespaces


clear-backlog

Clear backlog for all topics of the namespace (namespace-name)

pulsarctl namespaces clear-backlog (namespace-name)

Clear backlog for all topic of the namespace (namespace-name) with a bundle range

pulsarctl namespaces clear-backlog --bundle (bundle) (namespace-name)

Clear the specified subscription (subscription-name) backlog for all topics of the namespace (namespace-name)

pulsarctl namespaces clear-backlog --subscription (subscription-name) (namespace-name)

Used For

This command is used for clearing backlog for all topics of a namespace.

Required Permission

This command requires tenant admin permissions.

Output

//normal output

Successfully clear backlog for all topics of the namespace (namespace-name)

//the namespace name is not specified or the namespace name is specified more than one

[✖] the namespace name is not specified or the namespace name is specified more than one

//the specified namespace name does not exist

[✖] code: 404 reason: Namespace does not exist

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

Usage

$ clear-backlog

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. bundle | b | | {start-boundary}_{end-boundary} force | f | false | Whether to force clear backlog without prompt output | o | text | The output format (text,json,yaml) sub | | | subscription name tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


clear-offload-deletion-lag

Clear offload deletion lag of the namespace (namespace-name)

pulsarctl namespaces clear-offload-deletion-lag (namespace-name)

Used For

This command is used for clearing offload deletion lag of a namespace.

Required Permission

This command requires super-user permissions and broker has write policies permission.

Output

//normal output

Successfully clear the offload deletion lag of the namespace (namespace-name)

//the namespace name is not specified or the namespace name is specified more than one

[✖] the namespace name is not specified or the namespace name is specified more than one

//the specified namespace name does not exist

[✖] code: 404 reason: Namespace does not exist

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

Usage

$ clear-offload-deletion-lag

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


create

creates a namespace named (namespace-name)

pulsarctl namespaces create (namespace-name)

Used For

Creates a new namespace

Required Permission

This command requires tenant admin permissions.

Output

//normal output

Created (namespace-name) successfully

//the tenant does not exist

[✖] code: 404 reason: Tenant does not exist

//you must specify a tenant/namespace name, please check if the tenant/namespace name is provided

[✖] the namespace name is not specified or the namespace name is specified more than one

//the namespace does not exist

[✖] code: 404 reason: Namespace (tenant/namespace) does not exist

//Invalid number of bundles, please check --bundles value

Invalid number of bundles. Number of numBundles has to be in the range of (0, 2^32].

Usage

$ create

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. bundles | b | 0 | number of bundles to activate clusters | c | [] | List of clusters this namespace will be assigned output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


delete

Delete a namespace

pulsarctl namespaces delete (namespace-name)

Used For

Delete a namespace. The namespace needs to be empty

Required Permission

This command requires tenant admin permissions.

Output

//normal output

Deleted (namespace-name) successfully

//you must specify a tenant/namespace name, please check if the tenant/namespace name is provided

[✖] the namespace name is not specified or the namespace name is specified more than one

//the tenant does not exist

[✖] code: 404 reason: Tenant does not exist

Usage

$ delete

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


delete-anti-affinity-group

Delete an anti-affinity group of a namespace

pulsarctl namespaces delete-anti-affinity-group tenant/namespace

Used For

Delete an anti-affinity group of a namespace

Required Permission

This command requires tenant admin permissions.

Output

//normal output

Delete the anti-affinity group successfully for [tenant/namespace]

//you must specify a tenant/namespace name, please check if the tenant/namespace name is provided

[✖] the namespace name is not specified or the namespace name is specified more than one

//the tenant does not exist

[✖] code: 404 reason: Tenant does not exist

//the namespace does not exist

[✖] code: 404 reason: Namespace (tenant/namespace) does not exist

Usage

$ delete-anti-affinity-group

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


get-anti-affinity-group

Get the anti-affinity group of a namespace

pulsarctl namespaces get-anti-affinity-group tenant/namespace

Used For

Get the anti-affinity group of a namespace

Required Permission

This command requires tenant admin permissions.

Output

//normal output

(Anti-affinity group name)

//you must specify a tenant/namespace name, please check if the tenant/namespace name is provided

[✖] the namespace name is not specified or the namespace name is specified more than one

//the tenant does not exist

[✖] code: 404 reason: Tenant does not exist

//the namespace does not exist

[✖] code: 404 reason: Namespace (tenant/namespace) does not exist

Usage

$ get-anti-affinity-group

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


get-anti-affinity-namespaces

Get the list of namespaces in the same anti-affinity group.

pulsarctl namespaces get-anti-affinity-namespaces tenant/namespace

Used For

Get the list of namespaces in the same anti-affinity group.

Required Permission

This command requires tenant admin permissions.

Output

//normal output

(anti-affinity name list)

//you must specify a tenant/namespace name, please check if the tenant/namespace name is provided

[✖] the namespace name is not specified or the namespace name is specified more than one

//the tenant does not exist

[✖] code: 404 reason: Tenant does not exist

//the namespace does not exist

[✖] code: 404 reason: Namespace (tenant/namespace) does not exist

Usage

$ get-anti-affinity-namespaces

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. cluster | c | | Cluster name group | g | | Anti-affinity group name output | o | text | The output format (text,json,yaml) tenant | t | | tenant is only used for authorization. Client has to be admin of any of the tenant to access this api tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


get-backlog-quotas

Get the backlog quota policy of a namespace

pulsarctl namespaces get-backlog-quotas tenant/namespace

Used For

Get the backlog quota policy of a namespace

Required Permission

This command requires tenant admin permissions.

Output

//normal output

{

"destination_storage" : {

"limit" : 10737418240,

"policy" : "producer_request_hold"

}

}

//you must specify a tenant/namespace name, please check if the tenant/namespace name is provided

[✖] the namespace name is not specified or the namespace name is specified more than one

//the tenant does not exist

[✖] code: 404 reason: Tenant does not exist

//the namespace does not exist

[✖] code: 404 reason: Namespace (tenant/namespace) does not exist

Usage

$ get-backlog-quotas

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


get-clusters

Get the replicated clusters of a namespace

pulsarctl namespaces get-clusters tenant/namespace

Used For

Get the replicated clusters of a namespace

Required Permission

This command requires tenant admin permissions.

Output

//normal output

(cluster name)

//you must specify a tenant/namespace name, please check if the tenant/namespace name is provided

[✖] the namespace name is not specified or the namespace name is specified more than one

//the tenant does not exist

[✖] code: 404 reason: Tenant does not exist

//the namespace does not exist

[✖] code: 404 reason: Namespace (tenant/namespace) does not exist

Usage

$ get-clusters

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


get-compaction-threshold

Get compaction threshold of the namespace (namespace-name)

pulsarctl namespaces get-compaction-threshold (namespace-name)

Used For

This command is used for getting compaction threshold of a namespace.

Required Permission

This command requires tenant admin permissions.

Output

//normal output

The compaction size threshold of the namespace (namespace-name) is (size) byte(s)

//the namespace name is not specified or the namespace name is specified more than one

[✖] the namespace name is not specified or the namespace name is specified more than one

//the specified namespace name does not exist

[✖] code: 404 reason: Namespace does not exist

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

Usage

$ get-compaction-threshold

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


get-dispatch-rate

Get the default message dispatch rate of namespace (namespace-name)

pulsarctl namespaces get-dispatch-rate (namespace)

Used For

This command is used for getting the default message dispatch rate of a namespace.

Required Permission

This command requires tenant admin permissions.

Output

//normal output

{

"dispatchThrottlingRateInMsg" : 0,

"dispatchThrottlingRateInByte" : 0,

"ratePeriodInSecond" : 1

}

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

Usage

$ get-dispatch-rate

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


get-max-consumers-per-subscription

Get the max consumers per subscription of the namespace (namespace-name)

pulsarctl namespaces get-max-consumers-per-subscription (namespace-name)

Used For

This command is used for getting the max consumers per subscription of a namespace.

Required Permission

This command requires tenant admin permissions.

Output

//normal output

The max consumers per subscription of the namespace (namespace-name) is (size)

//the namespace name is not specified or the namespace name is specified more than one

[✖] the namespace name is not specified or the namespace name is specified more than one

//the specified namespace name does not exist

[✖] code: 404 reason: Namespace does not exist

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

Usage

$ get-max-consumers-per-subscription

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


get-max-consumers-per-topic

Get the max consumers per topic of the namespace (namespace-name)

pulsarctl namespaces get-max-consumers-per-topic (namespace-name)

Used For

This command is used for getting the max consumers per topic of a namespace.

Required Permission

This command requires tenant admin permissions.

Output

//normal output

The max consumers per topic of the namespace (namespace-name) is (size)

//the namespace name is not specified or the namespace name is specified more than one

[✖] the namespace name is not specified or the namespace name is specified more than one

//the specified namespace name does not exist

[✖] code: 404 reason: Namespace does not exist

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

Usage

$ get-max-consumers-per-topic

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


get-max-producers-per-topic

Get the max producers per topic of the namespace (namespace-name)

pulsarctl namespaces get-max-producers-per-topic (namespace-name)

Used For

This command is used for getting the max producers per topic of a namespace.

Required Permission

This command requires tenant admin permissions.

Output

//normal output

The max producers per topic of the namespace (namespace-name) is (size)

//the namespace name is not specified or the namespace name is specified more than one

[✖] the namespace name is not specified or the namespace name is specified more than one

//the specified namespace name does not exist

[✖] code: 404 reason: Namespace does not exist

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

Usage

$ get-max-producers-per-topic

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


get-message-ttl

Get message TTL settings of a namespace

pulsarctl namespaces get-message-ttl tenant/namespace

Used For

Get message TTL settings of a namespace

Required Permission

This command requires tenant admin permissions.

Output

//normal output

(ttl-value)

//you must specify a tenant/namespace name, please check if the tenant/namespace name is provided

[✖] the namespace name is not specified or the namespace name is specified more than one

//the tenant does not exist

[✖] code: 404 reason: Tenant does not exist

//the namespace does not exist

[✖] code: 404 reason: Namespace (tenant/namespace) does not exist

Usage

$ get-message-ttl

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


get-offload-deletion-lag

Get the offload deletion lag of the namespace (namespace-name)

pulsarctl namespaces get-offload-deletion-lag (namespace-name)

Used For

This command is used for getting the offload deletion lag of a namespace.

Required Permission

This command requires tenant admin permissions.

Output

//normal output

The offload deletion lag of the namespace (namespace-name) is (n) minute(s)

//the namespace name is not specified or the namespace name is specified more than one

[✖] the namespace name is not specified or the namespace name is specified more than one

//the specified namespace name does not exist

[✖] code: 404 reason: Namespace does not exist

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

Usage

$ get-offload-deletion-lag

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


get-offload-threshold

Get the offload threshold of the namespace (namespace-name)

pulsarctl namespaces get-offload-threshold (namespace-name)

Used For

This command is used for getting the offload threshold of a namespace.

Required Permission

This command requires tenant admin permissions.

Output

//normal output

The offload threshold of the namespace (namespace-name) is (size) byte(s)

//the namespace name is not specified or the namespace name is specified more than one

[✖] the namespace name is not specified or the namespace name is specified more than one

//the specified namespace name does not exist

[✖] code: 404 reason: Namespace does not exist

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

Usage

$ get-offload-threshold

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


get-persistence

Get the persistence policy of a namespace

pulsarctl namespaces get-persistence tenant/namespace

Used For

Get the persistence policy of a namespace

Required Permission

This command requires tenant admin permissions.

Output

//normal output

{

"bookkeeperEnsemble": 1,

"bookkeeperWriteQuorum": 1,

"bookkeeperAckQuorum": 1,

"managedLedgerMaxMarkDeleteRate": 0,

}

//you must specify a tenant/namespace name, please check if the tenant/namespace name is provided

[✖] the namespace name is not specified or the namespace name is specified more than one

//the tenant does not exist

[✖] code: 404 reason: Tenant does not exist

//the namespace does not exist

[✖] code: 404 reason: Namespace (tenant/namespace) does not exist

Usage

$ get-persistence

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


get-publish-rate

Get the default message publish rate of namespace (namespace-name)

pulsarctl namespaces get-publish-rate (namespace)

Used For

This command is used for getting the default message publish rate of a namespace.

Required Permission

This command requires tenant admin permissions.

Output

//normal output

{

"publishThrottlingRateInMsg" : -1,

"publishThrottlingRateInByte" : 0,

}

//the specified namespace name does not exist

[✖] code: 404 reason: Namespace does not exist

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

Usage

$ get-publish-rate

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


get-replicator-dispatch-rate

Get the default replicator message dispatch rate of the namespace (namespace-name)

pulsarctl namespaces get-replicator-dispatch-rate (namespace)

Used For

This command is used for getting the default replicator message dispatch rate of a namespace.

Required Permission

This command requires tenant admin permissions.

Output

//normal output

{

"dispatchThrottlingRateInMsg" : 0,

"dispatchThrottlingRateInByte" : 0,

"ratePeriodInSecond" : 1

}

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

Usage

$ get-replicator-dispatch-rate

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


get-retention

Get the retention policy of a namespace

pulsarctl namespaces get-retention tenant/namespace

Used For

Get the retention policy of a namespace

Required Permission

This command requires tenant admin permissions.

Output

//normal output

{

"RetentionTimeInMinutes": 0,

"RetentionSizeInMB": 0

}

//you must specify a tenant/namespace name, please check if the tenant/namespace name is provided

[✖] the namespace name is not specified or the namespace name is specified more than one

//the tenant does not exist

[✖] code: 404 reason: Tenant does not exist

//the namespace does not exist

[✖] code: 404 reason: Namespace (tenant/namespace) does not exist

Usage

$ get-retention

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


get-schema-autoupdate-strategy

Get the schema auto-update strategy of the namespace (namespace-name)

pulsarctl namespaces get-schema-autoupdate-strategy (namespace-name)

Used For

This command is used for getting the schema auto-update strategy of a namespace.

Required Permission

This command requires super-user permissions and broker has write policies permission.

Output

//normal output

The schema auto-update strategy of the namespace (namespace-name) is (strategy)

//the namespace name is not specified or the namespace name is specified more than one

[✖] the namespace name is not specified or the namespace name is specified more than one

//the specified namespace name does not exist

[✖] code: 404 reason: Namespace does not exist

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

Usage

$ get-schema-autoupdate-strategy

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


get-schema-validation-enforced

Get schema validation status

pulsarctl namespaces get-schema-validation-enforced <namespace-name>

Used For

This command is used for getting the schema validation enforced.

Required Permission

This command requires super-user and tenant admin permissions.

Output

//normal output

Schema validation enforced is enabled/disabled

//the namespace name is not specified or the namespace name is specified more than one

[✖] the namespace name is not specified or the namespace name is specified more than one

//the specified namespace name does not exist

[✖] code: 404 reason: Namespace does not exist

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

Usage

$ get-schema-validation-enforced

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


get-subscribe-rate

Get the default subscribe rate per consumer of a namespace (namespace-name)

pulsarctl namespaces get-subscribe-rate (namespace)

Used For

This command is used for getting the default subscribe rate per consumer of a namespace.

Required Permission

This command requires tenant admin permissions.

Output

//normal output

{

"subscribeThrottlingRatePerConsumer" : 0,

"ratePeriodInSecond" : 30

}

//the namespace name is not specified or the namespace name is specified more than one

[✖] the namespace name is not specified or the namespace name is specified more than one

//the specified namespace name does not exist

[✖] code: 404 reason: Namespace does not exist

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

Usage

$ get-subscribe-rate

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


get-subscription-dispatch-rate

Get the default subscription message dispatch rate of namespace (namespace-name)

pulsarctl namespaces get-subscription-dispatch-rate (namespace-name)

Used For

This command is used for getting the default subscription message dispatch rate of a namespace.

Required Permission

This command requires tenant admin permissions.

Output

//normal output

{

"dispatchThrottlingRateInMsg" : 0,

"dispatchThrottlingRateInByte" : 0,

"ratePeriodInSecond" : 1

}

//the namespace name is not specified or the namespace name is specified more than one

[✖] the namespace name is not specified or the namespace name is specified more than one

//the specified namespace name does not exist

[✖] code: 404 reason: Namespace does not exist

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

Usage

$ get-subscription-dispatch-rate

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


grant-permission

Grant permission (action) to the client role (role-name) to access the namespace (namespace-name)

pulsarctl namespaces grant-permission --role (role-name) --actions (action) (namespace-name)

Grant permissions (actions) to the client role (role-name) to access the namespace (namespace-name)

pulsarctl namespaces grant-permission --role (role-name) --actions (action-1) --actions (action-2) (namespace-name)

Used For

This command is used for granting permissions to a client role to access a namespace.

Required Permission

This command requires tenant admin permissions.

Output

//normal output

Grant permissions (actions) to the client role (role-name) to access the namespace (namespace-name) successfully

//the namespace name is not specified or the namespace name is specified more than one

[✖] the namespace name is not specified or the namespace name is specified more than one

//the authorization is not enabled

[✖] code: 501 reason: Authorization is not enabled

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

Usage

$ grant-permission

Flags

Name Shorthand Default Usage
actions [] Actions to be granted (produce,consume,sources,sinks,functions,packages)
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) role | | | Client role to which grant permissions tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


grant-subscription-permission

Grant the client roles (roles-name) to access the subscription (subscription-name) of the namespace (namespace-name)

pulsarctl namespaces grant-subscription-permission --role (role1-name) --role (role2-name) (namespace-name) (subscription-name)

Used For

This command is used for granting client roles to access a subscription of a namespace.

Required Permission

This command requires super-user permissions.

Output

//normal output

Grant the client role to access the subscription of the namespace successfully

//the namespace name is not specified or the subscription name is not specified

[✖] need to specified namespace name and subscription name

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

Usage

$ grant-subscription-permission

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) role | | [] | Client role to which grant permissions tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


list

Get the list of namespaces of a tenant

pulsarctl namespaces list (tenant name)

Used For

Get the list of namespaces of a tenant

Required Permission

This command requires tenant admin permissions.

Output

//normal output

+------------------+

| NAMESPACE NAME |

+------------------+

| public/default |

| public/functions |

+------------------+

//you must specify a tenant name, please check if the tenant name is provided

[✖] the tenant name is not specified or the tenant name is specified more than one

//the tenant does not exist

[✖] code: 404 reason: Tenant does not exist

Usage

$ list

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


messages-encryption

Enable messages encryption for the namespace (namespace-name)

pulsarctl namespaces messages-encryption (namespace-name)

Disable messages encryption for the namespace (namespace-name)

pulsarct. namespaces messages-encryption --disable (namespace-name)

Used For

This command is used for enabling or disabling messages encryption for a namespace.

Required Permission

This command requires tenant admin and a broker needs the read-write operations of the global zookeeper.

Output

//normal output

Enable/Disable message encryption for the namespace (namespace-name)

//the namespace name is not specified or the namespace name is specified more than one

[✖] the namespace name is not specified or the namespace name is specified more than one

//the specified namespace name does not exist

[✖] code: 404 reason: Namespace does not exist

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

Usage

$ messages-encryption

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. disable | | false | Disable messages encryption output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


permissions

Get permissions configure data of a namespace (tenant)/(namespace)

pulsarctl namespaces permissions (tenant)/(namespace)

Used For

This command is used for getting permissions configure data of a namespace.

Required Permission

This command requires tenant admin permissions.

Output

//normal output

{

"": [

""

]

}

//the namespace name is not specified or the namespace name is specified more than one

[✖] the namespace name is not specified or the namespace name is specified more than one

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

Usage

$ permissions

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


policies

Get the configuration policies of a namespace

pulsarctl namespaces policies (tenant/namespace)

Used For

Get the configuration policies of a namespace

Required Permission

This command requires tenant admin permissions.

Output

//normal output

{

"AuthPolicies": {},

"ReplicationClusters": null,

"Bundles": {

"boundaries": [

"0x00000000",

"0x40000000",

"0x80000000",

"0xc0000000",

"0xffffffff"

],

"numBundles": 4

},

"BacklogQuotaMap": null,

"TopicDispatchRate": {

"standalone": {

"DispatchThrottlingRateInMsg": 0,

"DispatchThrottlingRateInByte": 0,

"RatePeriodInSecond": 1

}

},

"SubscriptionDispatchRate": {

"standalone": {

"DispatchThrottlingRateInMsg": 0,

"DispatchThrottlingRateInByte": 0,

"RatePeriodInSecond": 1

}

},

"ClusterSubscribeRate": {

"standalone": {

"SubscribeThrottlingRatePerConsumer": 0,

"RatePeriodInSecond": 30

}

},

"Persistence": {

"BookkeeperEnsemble": 0,

"BookkeeperWriteQuorum": 0,

"BookkeeperAckQuorum": 0,

"ManagedLedgerMaxMarkDeleteRate": 0

},

"DeduplicationEnabled": false,

"LatencyStatsSampleRate": null,

"MessageTTLInSeconds": 0,

"RetentionPolicies": {

"RetentionTimeInMinutes": 0,

"RetentionSizeInMB": 0

},

"Deleted": false,

"AntiAffinityGroup": "",

"EncryptionRequired": false,

"SubscriptionAuthMode": "",

"MaxProducersPerTopic": 0,

"MaxConsumersPerTopic": 0,

"MaxConsumersPerSubscription": 0,

"CompactionThreshold": 0,

"OffloadThreshold": 0,

"OffloadDeletionLagMs": 0,

"SchemaCompatibilityStrategy": "",

"SchemaValidationEnforced": false

}

//you must specify a tenant/namespace name, please check if the tenant/namespace name is provided

[✖] the namespace name is not specified or the namespace name is specified more than one

//the tenant does not exist

[✖] code: 404 reason: Tenant does not exist

//the namespace does not exist

[✖] code: 404 reason: Namespace (tenant/namespace) does not exist

Usage

$ policies

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


remove-backlog-quota

Remove a backlog quota policy from a namespace

pulsarctl namespaces remove-backlog-quota tenant/namespace

Used For

Remove a backlog quota policy from a namespace

Required Permission

This command requires tenant admin permissions.

Output

//normal output

Remove backlog quota successfully for [tenant/namespace]

//you must specify a tenant/namespace name, please check if the tenant/namespace name is provided

[✖] the namespace name is not specified or the namespace name is specified more than one

//the tenant does not exist

[✖] code: 404 reason: Tenant does not exist

//the namespace does not exist

[✖] code: 404 reason: Namespace (tenant/namespace) does not exist

Usage

$ remove-backlog-quota

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


remove-topic-auto-creation

Remove topic auto-creation config for a namespace, defaulting to broker settings

pulsarctl namespaces remove-topic-auto-creation tenant/namespace

Used For

Remove topic auto-creation config for a namespace, defaulting to broker settings

Required Permission

This command requires tenant admin permissions.

Output

//normal output

Remove topic auto-creation config successfully for [tenant/namespace]

//you must specify a tenant/namespace name, please check if the tenant/namespace name is provided

[✖] the namespace name is not specified or the namespace name is specified more than one

//the tenant does not exist

[✖] code: 404 reason: Tenant does not exist

//the namespace does not exist

[✖] code: 404 reason: Namespace (tenant/namespace) does not exist

Usage

$ remove-topic-auto-creation

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


revoke-permission

Revoke the client role (role-name) of accessing the namespace (namespace-name)

pulsarctl namespaces revoke-permission --role (role-name) (namespace-name)

Used For

This command is used for revoking a client role permissions of accessing a namespace.

Required Permission

This command requires tenant admin permissions and broker has read-writer permissions on the zookeeper.

Output

//normal output

Revoke the client role (role-name) permissions of accessing the namespace (namespace-name) successfully

//the namespace name is not specified or the namespace name is specified more than one

[✖] the namespace name is not specified or the namespace name is specified more than one

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

Usage

$ revoke-permission

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) role | | | Client role to which revoke permissions tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


revoke-subscription-permission

USED FOR:
This command is used for revoking a client role permissions of accessing a subscription of a namespace.
REQUIRED PERMISSION:
This command requires tenant admin permissions and broker has read-writer permissions on the zookeeper.
OUTPUT:

normal output

Revoke the client role (role-name) permissions of accessing the subscription (subscription-name) of the namespace (namespace-name) successfully

the namespace name is not specified or the subscription name is not specified

[✖]  need to specified namespace name and subscription name

the namespace name is not in the format of /

[✖]  The complete name of namespace is invalid. complete name : <namespace-complete-name>

the tenant name and(or) namespace name is empty

[✖]  Invalid tenant or namespace. [<tenant>/<namespace>]

the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖]  Tenant name include unsupported special chars. tenant : [<namespace>]

the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖]  Namespace name include unsupported special chars. namespace : [<namespace>]

Used For

This command is used for revoking a client role permissions of accessing a subscription of a namespace.

Required Permission

This command requires tenant admin permissions and broker has read-writer permissions on the zookeeper.

Output

//normal output

Revoke the client role (role-name) permissions of accessing the subscription (subscription-name) of the namespace (namespace-name) successfully

//the namespace name is not specified or the subscription name is not specified

[✖] need to specified namespace name and subscription name

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

Usage

$ revoke-subscription-permission

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) role | | | Client role to which revoke permissions tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


set-anti-affinity-group

Set the anti-affinity group for a namespace

pulsarctl namespaces set-anti-affinity-group tenant/namespace
--group (anti-affinity group name)

Used For

Set the anti-affinity group for a namespace

Required Permission

This command requires tenant admin permissions.

Output

//normal output

Set the anti-affinity group: (anti-affinity group name) successfully for

//you must specify a tenant/namespace name, please check if the tenant/namespace name is provided

[✖] the namespace name is not specified or the namespace name is specified more than one

//the tenant does not exist

[✖] code: 404 reason: Tenant does not exist

//the namespace does not exist

[✖] code: 404 reason: Namespace (tenant/namespace) does not exist

Usage

$ set-anti-affinity-group

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. group | g | | Anti-affinity group name output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


set-backlog-quota

Set a backlog quota policy for a namespace

pulsarctl namespaces set-backlog-quota tenant/namespace
--limit-size 16G
--limit-time -1
--policy producer_request_hold    --type <destination_storage|message_age>

Used For

Set a backlog quota policy for a namespace

Required Permission

This command requires tenant admin permissions.

Output

//normal output

Set backlog quota successfully for [tenant/namespace]

//you must specify a tenant/namespace name, please check if the tenant/namespace name is provided

[✖] the namespace name is not specified or the namespace name is specified more than one

//the tenant does not exist

[✖] code: 404 reason: Tenant does not exist

//the namespace does not exist

[✖] code: 404 reason: Namespace (tenant/namespace) does not exist

//invalid retention policy type, please check --policy arg

invalid retention policy type: (policy type)

Usage

$ set-backlog-quota

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. limit-size | l | | Size limit (eg: 10M, 16G) limit-time | t | -1 | Time limit in seconds output | o | text | The output format (text,json,yaml) policy | p | | Retention policy to enforce when the limit is reached. Valid options are: [producer_request_hold, producer_exception, consumer_backlog_eviction] tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication type | | destination_storage | Backlog quota type to set. Valid options are: [destination_storage, message_age]


set-clusters

Set the replicated clusters for a namespace

pulsarctl namespaces set-clusters tenant/namespace --clusters (cluster name)

Used For

Set the replicated clusters for a namespace

Required Permission

This command requires tenant admin permissions.

Output

//normal output

Set replication clusters successfully for tenant/namespace

//you must specify a tenant/namespace name, please check if the tenant/namespace name is provided

[✖] the namespace name is not specified or the namespace name is specified more than one

//the tenant does not exist

[✖] code: 404 reason: Tenant does not exist

//the namespace does not exist

[✖] code: 404 reason: Namespace (tenant/namespace) does not exist

//Invalid cluster name, please check if your cluster name has the appropriate permissions under the current tenant

[✖] code: 403 reason: Cluster name is not in the list of allowed clusters list for tenant [public]

Usage

$ set-clusters

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. clusters | c | | Replication Cluster Ids list (comma separated values) output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


set-compaction-threshold

Set the compaction size threshold of the namespace (namespace-name) to (size)

pulsarctl namespaces set-compaction-threshold --size (size) (namespace-name)

Used For

This command is used for setting compaction threshold of a namespace.

Required Permission

This command requires super-user permissions and broker has write policies permission.

Output

//normal output

Successfully set the compaction size threshold of the namespace (namespace-name) to (size)

//the namespace name is not specified or the namespace name is specified more than one

[✖] the namespace name is not specified or the namespace name is specified more than one

//the specified namespace name does not exist

[✖] code: 404 reason: Namespace does not exist

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

Usage

$ set-compaction-threshold

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) size | | 0 | Maximum number of bytes in a topic backlog before compaction is triggered (e.g. 10M, 16G, 3T). 0 disable automatic compaction tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


set-deduplication

Enable or disable deduplication for a namespace

pulsarctl namespaces set-deduplication tenant/namespace (--enable)

Used For

Enable or disable deduplication for a namespace

Required Permission

This command requires tenant admin permissions.

Output

//normal output

Set deduplication is [true or false] successfully for public/default

//you must specify a tenant/namespace name, please check if the tenant/namespace name is provided

[✖] the namespace name is not specified or the namespace name is specified more than one

//the tenant does not exist

[✖] code: 404 reason: Tenant does not exist

//the namespace does not exist

[✖] code: 404 reason: Namespace (tenant/namespace) does not exist

Usage

$ set-deduplication

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. enable | e | false | Enable deduplication output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


set-dispatch-rate

Set the default message dispatch rate by message of the namespace (namespace-name) to (rate)

pulsarctl namespaces set-dispatch-rate --msg-rate (rate) (namespace)

Set the default message dispatch rate by byte of the namespace (namespace-name) to (rate)

pulsarctl namespaces set-dispatch-rate --byte-rate (rate) (namespace)

Set the default message dispatch rate by time of the namespace (namespace-name) to (period)

pulsarctl namespaces set-dispatch-rate --period (period) (namespace)

Used For

This command is used for setting the default message dispatch rate of a namespace.

Required Permission

This command requires super-user permissions.

Output

//normal output

Success set the default message dispatch rate of the namespace (namespace-name) to (rate)

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

Usage

$ set-dispatch-rate

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. byte-rate | b | -1 | byte dispatch rate (default -1) msg-rate | m | -1 | message dispatch rate (default -1) output | o | text | The output format (text,json,yaml) period | p | 1 | dispatch rate period (default 1 second) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


set-max-consumers-per-subscription

Set the max consumers per subscription of the namespace (namespace-name) to (size)

pulsarctl namespaces set-max-consumers-per-subscription --size (size) (namespace-name)

Used For

This command is used for setting the max consumers per subscription of a namespace.

Required Permission

This command requires super-user permissions and broker has write policies permission.

Output

//normal output

Successfully set the max consumers per subscription of the namespace (namespace-name) to (size)

//the namespace name is not specified or the namespace name is specified more than one

[✖] the namespace name is not specified or the namespace name is specified more than one

//the specified namespace name does not exist

[✖] code: 404 reason: Namespace does not exist

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

Usage

$ set-max-consumers-per-subscription

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) size | | -1 | max consumers per subscription tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


set-max-consumers-per-topic

Set the max consumers per topic of the namespace (namespace-name) to (size)

pulsarctl namespaces set-max-consumers-per-topic --size (size) (namespace-name)

Used For

This command is used for setting the max consumers per topic of a namespace.

Required Permission

This command requires super-user permissions and broker has write policies permission.

Output

//normal output

Successfully set the max consumers per topic of the namespace (namespace-name) to (size)

//the namespace name is not specified or the namespace name is specified more than one

[✖] the namespace name is not specified or the namespace name is specified more than one

//the specified namespace name does not exist

[✖] code: 404 reason: Namespace does not exist

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

Usage

$ set-max-consumers-per-topic

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) size | | -1 | max consumers per topic tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


set-max-producers-per-topic

Set the max producers per topic of the namespace (namespace-name) to (size)

pulsarctl namespaces set-max-producers-per-topic --size (size) (namespace-name)

Used For

This command is used for setting the max producers per topic of a namespace.

Required Permission

This command requires super-user permissions and broker has write policies permission.

Output

//normal output

Successfully set the max producers per topic of namespace (namespace-name) to (size)

//the namespace name is not specified or the namespace name is specified more than one

[✖] the namespace name is not specified or the namespace name is specified more than one

//the specified namespace name does not exist

[✖] code: 404 reason: Namespace does not exist

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

Usage

$ set-max-producers-per-topic

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) size | | -1 | max producers per topic tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


set-message-ttl

Set Message TTL for a namespace

pulsarctl namespaces set-message-ttl tenant/namespace -ttl 10

Used For

Set Message TTL for a namespace

Required Permission

This command requires tenant admin permissions.

Output

//normal output

Set message TTL successfully for [tenant/namespace]

//Invalid value for message TTL, please check -ttl arg

code: 412 reason: Invalid value for message TTL

//you must specify a tenant/namespace name, please check if the tenant/namespace name is provided

[✖] the namespace name is not specified or the namespace name is specified more than one

//the tenant does not exist

[✖] code: 404 reason: Tenant does not exist

//the namespace does not exist

[✖] code: 404 reason: Namespace (tenant/namespace) does not exist

Usage

$ set-message-ttl

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. messageTTL | t | 0 | Message TTL in seconds output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


set-offload-deletion-lag

Set the offload deletion (duration) of the namespace (namespace-name)

pulsarctl namespaces set-offload-deletion-lag --lag (duration) (namespace-name)

Used For

This command is used for setting the offload deletion of a namespace.

Required Permission

This command requires super-user permissions and broker has write policies permission.

Output

//normal output

Successfully set the offload deletion lag of the namespace (namespace-name) to (duration)

//the namespace name is not specified or the namespace name is specified more than one

[✖] the namespace name is not specified or the namespace name is specified more than one

//the specified namespace name does not exist

[✖] code: 404 reason: Namespace does not exist

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

Usage

$ set-offload-deletion-lag

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. lag | l | | Duration to wait after offloading a ledger segment, before deleting the copy of that segment from cluster local storage. (e.g. 1s, 1m, 1h) output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


set-offload-threshold

Set the offload threshold of the namespace (namespace-name) to (size)

pulsarctl namespaces set-offload-threshold --size (size) (namespace-name)

Used For

This command is used for setting the offload threshold of a namespace.

Required Permission

This command requires super-user permissions and broker has write policies permission.

Output

//normal output

Successfully set the offload threshold of the namespace (namespace-name) to (size)

//the namespace name is not specified or the namespace name is specified more than one

[✖] the namespace name is not specified or the namespace name is specified more than one

//the specified namespace name does not exist

[✖] code: 404 reason: Namespace does not exist

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

Usage

$ set-offload-threshold

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. size | | -1 | Maximum number of bytes stored in the pulsar cluster for a topic before data will start being automatically offloaded to longterm storage (e.g. 10m, 16g, 3t, 100) Negative values disable automatic offload. 0 triggers offloading as soon as possible. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


set-persistence

Set the persistence policy for a namespace

pulsarctl namespaces set-persistence tenant/namespace
--ensemble-size 2
--write-quorum-size 2
--ack-quorum-size 2
--ml-mark-delete-max-rate 2.0

Used For

Set the persistence policy for a namespace

Required Permission

This command requires tenant admin permissions.

Output

//normal output

Set the persistence policies successfully for [tenant/namespace]

//you must specify a tenant/namespace name, please check if the tenant/namespace name is provided

[✖] the namespace name is not specified or the namespace name is specified more than one

//the tenant does not exist

[✖] code: 404 reason: Tenant does not exist

//the namespace does not exist

[✖] code: 404 reason: Namespace (tenant/namespace) does not exist

//Bookkeeper Ensemble >= WriteQuorum >= AckQuoru, please c

code: 412 reason: Bookkeeper Ensemble >= WriteQuorum >= AckQuoru

Usage

$ set-persistence

Flags

Name Shorthand Default Usage
ack-quorum-size a 0 Number of acks (guaranteed copies) to wait for each entry
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. ensemble-size | e | 0 | Number of bookies to use for a topic ml-mark-delete-max-rate | r | 0 | Throttling rate of mark-delete operation (0 means no throttle) output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication write-quorum-size | w | 0 | How many writes to make of each entry


set-publish-rate

Set the default message publish rate per second by message of the namespace (namespace-name) to (rate)

pulsarctl namespaces set-publish-rate --msg-rate (rate) (namespace)

Set the default message publish rate per second by byte of the namespace (namespace-name) to (rate)

pulsarctl namespaces set-publish-rate --byte-rate (rate) (namespace)

Used For

This command is used for setting the default maximum message publish rate of a namespace per second.

Required Permission

This command requires super-user permissions.

Output

//normal output

Success set the default message publish rate of the namespace (namespace-name) to (rate)

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

Usage

$ set-publish-rate

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. byte-rate | b | -1 | byte publish rate per second (default -1) msg-rate | m | -1 | message publish rate per second (default -1) output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


set-replicator-dispatch-rate

Set the default replicator message dispatch rate by message of the namespace (namespace-name) to (rate)

pulsarctl namespaces set-replicator-dispatch-rate --msg-rate (rate) (namespace)

Set the default replicator message dispatch rate by byte of the namespace (namespace-name) to (rate)

pulsarctl namespaces set-replicator-dispatch-rate --byte-rate (rate) (namespace)

Set the default replicator message dispatch rate by time of the namespace (namespace-name) to (period)

pulsarctl namespaces set-replicator-dispatch-rate --period (period) (namespace)

Used For

This command is used for setting the default replicator message dispatch rate of a namespace.

Required Permission

This command requires super-user permissions.

Output

//normal output

Success set the default replicator message dispatch rate of the namespace (namespace-name) to (rate)

//the namespace name is not specified or the namespace name is specified more than one

[✖] the namespace name is not specified or the namespace name is specified more than one

//the replicator-dispatch-rate is not configured

[✖] code: 404 reason: replicator-Dispatch-rate is not configured for cluster standalone

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

Usage

$ set-replicator-dispatch-rate

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. byte-rate | b | -1 | byte dispatch rate (default -1) msg-rate | m | -1 | message dispatch rate (default -1) output | o | text | The output format (text,json,yaml) period | p | 1 | dispatch rate period (default 1 second) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


set-retention

Set the retention policy for a namespace

pulsarctl namespaces set-retention tenant/namespace --time 100m --size 1G

Set the infinite time retention policy for a namespace

pulsarctl namespaces set-retention tenant/namespace --size -1

Used For

Set the retention policy for a namespace

Required Permission

This command requires tenant admin permissions.

Output

//normal output

Set retention successfully for [tenant/namespace]

//you must specify a tenant/namespace name, please check if the tenant/namespace name is provided

[✖] the namespace name is not specified or the namespace name is specified more than one

//the tenant does not exist

[✖] code: 404 reason: Tenant does not exist

//the namespace does not exist

[✖] code: 404 reason: Namespace (tenant/namespace) does not exist

//Retention Quota must exceed configured backlog quota for namespace

Retention Quota must exceed configured backlog quota for namespace

Usage

$ set-retention

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) size | | | Retention size limit (eg: 10M, 16G, 3T). 0 or less than 1MB means no retention and -1 means infinite size retention time | | | Retention time in minutes (or minutes, hours,days,weeks eg: 100m, 3h, 2d, 5w). 0 means no retention and -1 means infinite time retention tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


set-schema-autoupdate-strategy

Set the schema auto-update strategy to (strategy)

pulsarctl namespaces set-schema-autoupdate-strategy --compatibility (strategy) (namespace-name)

Used For

This command is used for setting the schema auto-update strategy of a namespace.

Required Permission

This command requires super-user permissions and broker has write policies permission.

Output

//normal output

Successfully set the schema auto-update strategy of the namespace (namespace-name) to (strategy)

//the namespace name is not specified or the namespace name is specified more than one

[✖] the namespace name is not specified or the namespace name is specified more than one

//the specified namespace name does not exist

[✖] code: 404 reason: Namespace does not exist

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

Usage

$ set-schema-autoupdate-strategy

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. compatibility | c | | Compatibility level required for new schemas created via a Producer. Possible values (AutoUpdateDisabled, Backward, Forward, Full, AlwaysCompatible, BackwardTransitive, ForwardTransitive, FullTransitive) output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


set-schema-validation-enforced

Enable schema validation enforced

pulsarctl namespaces set-schema-validation-enforced <namespace-name>

Disable schema validation enforced

pulsarctl namespaces set-schema-validation-enforced --disable <namespace-name>

Used For

This command is used for setting the schema whether open schema validation enforced.

Required Permission

This command requires super-user permissions and broker has write policies permission.

Output

//normal output

Enable/Disable schema validation enforced

//the namespace name is not specified or the namespace name is specified more than one

[✖] the namespace name is not specified or the namespace name is specified more than one

//the specified namespace name does not exist

[✖] code: 404 reason: Namespace does not exist

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

Usage

$ set-schema-validation-enforced

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. disable | d | false | Disable schema validation enforced output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


set-subscribe-rate

Set the default subscribe rate by subscribe of the namespace (namespace-name) (rate)

pulsarctl namespaces set-subscribe-rate --subscribe-rate (rate) (namespace)

Set the default subscribe rate by time of the namespace (namespace-name) (period)

pulsarctl namespaces set-subscribe-rate --period (period) (namespace)

Used For

This command is used for setting the default subscribe rate per consumer of a namespace.

Required Permission

This command requires super-user permissions.

Output

//normal output

Success set the default subscribe rate of the namespace (namespace-name) to (rate)

//the namespace name is not specified or the namespace name is specified more than one

[✖] the namespace name is not specified or the namespace name is specified more than one

//the specified namespace name does not exist

[✖] code: 404 reason: Namespace does not exist

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

Usage

$ set-subscribe-rate

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) period | p | 30 | dispatch rate period (default 30 second) subscribe-rate | m | -1 | message dispatch rate (default -1) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


set-subscription-auth-mode

Set the default subscription auth mode (mode) of the namespace (namespace-name)

pulsarctl namespaces set-subscription-auth-mode --mode (mode) (namespace-name)

Used For

This command is used for setting the default subscription auth mode of a namespace.

Required Permission

This command requires tenant admin and a broker needs the read-write operations of the global zookeeper.

Output

//normal output

Successfully set the default subscription auth mode of namespace to

//the namespace name is not specified or the namespace name is specified more than one

[✖] the namespace name is not specified or the namespace name is specified more than one

//the specified namespace name does not exist

[✖] code: 404 reason: Namespace does not exist

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

Usage

$ set-subscription-auth-mode

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. mode | m | | Subscription authorization mode of a namespace. (e.g. None, Prefix) output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


set-subscription-dispatch-rate

Set the default subscription message dispatch rate by message of the namespace (namespace-name) to (rate)

pulsarctl namespaces set-subscription-dispatch-rate --msg-rate <rate> <namespace

Set the default subscription message dispatch rate by byte of the namespace (namespace-name) to (rate)

pulsarctl namespaces set-subscription-dispatch-rate --byte-rate (rate) (namespace)

Set the default subscriptions message dispatch rate by time of the namespace (namespace-name) to (rate)

pulsarctl namespaces set-subscription-dispatch-rate --period (period) (namespace)

Used For

This command is used for setting the default subscription message dispatch rate of a namespace.

Required Permission

This command requires super-user permissions.

Output

//normal output

Success set the default subscription message dispatch rate of the namespace (namespace-name) to (rate)

//the namespace name is not specified or the namespace name is specified more than one

[✖] the namespace name is not specified or the namespace name is specified more than one

//the specified namespace name does not exist

[✖] code: 404 reason: Namespace does not exist

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

Usage

$ set-subscription-dispatch-rate

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. byte-rate | b | -1 | byte dispatch rate (default -1) msg-rate | m | -1 | message dispatch rate (default -1) output | o | text | The output format (text,json,yaml) period | p | 1 | dispatch rate period (default 1 second) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


set-topic-auto-creation

Set topic auto-creation config for a namespace, overriding broker settings

pulsarctl namespaces set-topic-auto-creation tenant/namespace
--type partitioned
--partitions 2

Used For

Set topic auto-creation config for a namespace, overriding broker settings

Required Permission

This command requires tenant admin permissions.

Output

//normal output

Set topic auto-creation config successfully for [tenant/namespace]

//you must specify a tenant/namespace name, please check if the tenant/namespace name is provided

[✖] the namespace name is not specified or the namespace name is specified more than one

//the tenant does not exist

[✖] code: 404 reason: Tenant does not exist

//the namespace does not exist

[✖] code: 404 reason: Namespace (tenant/namespace) does not exist

Usage

$ set-topic-auto-creation

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. disable | | false | disable topic auto-creation output | o | text | The output format (text,json,yaml) partitions | | 0 | number of partitions on auto-created partitioned topics tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication type | | | topic type to auto-create


split-bundle

Split a namespace-bundle from the current serving broker

pulsarctl namespaces split-bundle tenant/namespace --bundle ({start-boundary}_{end-boundary})

Split a namespace-bundle from the current serving broker

pulsarctl namespaces split-bundle tenant/namespace
--bundle ({start-boundary}_{end-boundary})
--unload

Used For

Split a namespace-bundle from the current serving broker

Required Permission

This command requires tenant admin permissions.

Output

//normal output

Split a namespace bundle: ({start-boundary}_{end-boundary}) successfully

//you must specify a tenant/namespace name, please check if the tenant/namespace name is provided

[✖] the namespace name is not specified or the namespace name is specified more than one

//the tenant does not exist

[✖] code: 404 reason: Tenant does not exist

//the namespace does not exist

[✖] code: 404 reason: Namespace (tenant/namespace) does not exist

//Please check if there is an active topic under the current split bundle.

[✖] code: 412 reason: Failed to find ownership for ServiceUnit:public/default/(bundle range)

Usage

$ split-bundle

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. bundle | b | | {start-boundary}_{end-boundary} output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication unload | u | false | Unload newly split bundles after splitting old bundle


topics

Get the list of topics for a namespace

pulsarctl namespaces topics (tenant/namespace)

Used For

Get the list of topics for a namespace

Required Permission

This command requires namespace admin permissions.

Output

//normal output

+-------------+

| TOPICS NAME |

+-------------+

+-------------+

//you must specify a tenant/namespace name, please check if the tenant/namespace name is provided

[✖] the namespace name is not specified or the namespace name is specified more than one

//the tenant does not exist

[✖] code: 404 reason: Tenant does not exist

//the namespace does not exist

[✖] code: 404 reason: Namespace (tenant/namespace) does not exist

Usage

$ topics

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


unload

Unload a namespace from the current serving broker

pulsarctl namespaces unload tenant/namespace

Unload a namespace with bundle from the current serving broker

pulsarctl namespaces unload tenant/namespace --bundle ({start-boundary}_{end-boundary})

Used For

Unload a namespace from the current serving broker

Required Permission

This command requires tenant admin permissions.

Output

//normal output

Unload namespace (tenant/namespace) (with bundle ({start-boundary}_{end-boundary})) successfully

//you must specify a tenant/namespace name, please check if the tenant/namespace name is provided

[✖] the namespace name is not specified or the namespace name is specified more than one

//the tenant does not exist

[✖] code: 404 reason: Tenant does not exist

//the namespace does not exist

[✖] code: 404 reason: Namespace (tenant/namespace) does not exist

Usage

$ unload

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. bundle | b | | {start-boundary}_{end-boundary}(e.g. 0x00000000_0xffffffff) output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


unsubscribe

Unsubscribe the specified subscription for all topic of the namespace (namespace-name)

pulsarctl namespaces unsubscribe (namespace-name) (subscription-name)

Unsubscribe the specified subscription (subscription-name) for all topic of the namespace (namespace-name) with bundle range

pulsarctl namespaces unsubscribe --bundle (bundle) (namespace-name) (subscription-name)

Used For

This command is used for unsubscribing the specified subscription for all topics of a namespace.

Required Permission

This command requires tenant admin permissions.

Output

//normal output

Successfully unsubscribe the subscription (subscription-name) for all topics of the namespace (namespace-name)

//the namespace name is not specified or the subscription name is not specified

[✖] need two arguments apply to the command

//the specified namespace name does not exist

[✖] code: 404 reason: Namespace does not exist

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

Usage

$ unsubscribe

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. bundle | b | | {startboundary}{end_boundary} output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


schemas

Usage

$ schemas


delete

Delete the latest schema for a topic

pulsarctl schemas delete (topic name)

Used For

Delete the latest schema for a topic

Required Permission

This command requires namespace admin permissions.

Output

//normal output

Deleted (topic name) successfully

//you must specify a topic name, please check if the topic name is provided

[✖] the topic name is not specified or the topic name is specified more than one

Usage

$ delete

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


get

Get the schema for a topic

pulsarctl schemas get (topic name)

Get the schema for a topic with version

pulsarctl schemas get (topic name)
--version 2

Used For

Get the schema for a topic.

Required Permission

This command requires namespace admin permissions.

Output

//normal output

{

"name": "test-schema",

"schema": {

"type": "record",

"name": "Test",

"fields": [

{

"name": "id",

"type": [

"null",

"int"

]

},

{

"name": "name",

"type": [

"null",

"string"

]

}

]

},

"type": "AVRO",

"properties": {}

}

//HTTP 404 Not Found, please check if the topic name you entered is correct

[✖] code: 404 reason: Not Found

//you must specify a topic name, please check if the topic name is provided

[✖] the topic name is not specified or the topic name is specified more than one

Usage

$ get

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


upload

Update the schema for a topic

pulsarctl schemas upload
(topic name)
--filename (the file path of schema)

Used For

Update the schema for a topic

Required Permission

This command requires namespace admin permissions.

Output

//normal output

Upload (topic name) successfully

//you must specify a topic name, please check if the topic name is provided

[✖] the topic name is not specified or the topic name is specified more than one

//no such file or directory

[✖] open (file path): no such file or directory

Usage

$ upload

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. filename | f | | filename tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


sinks

Usage

$ sinks


create

Create a Pulsar Sink in cluster mode

pulsarctl sink create
--tenant public
--namespace default
--name (the name of Pulsar Sink)
--inputs test-jdbc
--archive connectors/pulsar-io-jdbc-2.4.0.nar
--sink-config-file connectors/mysql-jdbc-sink.yaml
--parallelism 1

Create a Pulsar Sink in cluster mode with pkg URL

pulsarctl sink create
--tenant public
--namespace default
--name (the name of Pulsar Sink)
--inputs test-jdbc
--archive file:/http: + connectors/pulsar-io-jdbc-2.4.0.nar

Create a Pulsar Sink in cluster mode with schema type

pulsarctl sink create
--schema-type schema.STRING
// Other sink parameters

Create a Pulsar Sink in cluster mode with parallelism

pulsarctl sink create
--parallelism 1
// Other sink parameters

Create a Pulsar Sink in cluster mode with resource

pulsarctl sink create
--ram 5656565656
--disk 8080808080808080
--cpu 5.0
// Other sink parameters

Create a Pulsar Sink in cluster mode with sink config

pulsarctl sink create
--sink-config "{"publishTopic":"publishTopic", "key":"pulsar"}"
// Other sink parameters

Create a Pulsar Sink in cluster mode with processing guarantees

pulsarctl sink create
--processing-guarantees EFFECTIVELY_ONCE
// Other sink parameters

Used For

Create a Pulsar IO sink connector to run in a Pulsar cluster.

Required Permission

This command requires namespace function permissions.

Output

//normal output

Created (the name of a Pulsar Sinks) successfully

//sink archive not specified, please check --archive arg

[✖] Sink archive not specified

//Cannot specify both archive and sink-type, please check --archive and --sink-type args

[✖] Cannot specify both archive and sink-type

Usage

$ create

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
archive Path 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.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" auto-ack | | false | Whether or not the framework will automatically acknowledge messages bookie-service-url | | | The bookie web service url that pulsarctl connects to. classname | | | The sink's class name if archive is file-url-path (file://) cpu | | 0 | The CPU (in cores) that needs to be allocated per sink instance (applicable only to Docker runtime) custom-schema-inputs | | | The map of input topics to Schema types or class names (as a JSON string) custom-serde-inputs | | | The map of input topics to SerDe class names (as a JSON string) disk | | 0 | The disk (in bytes) that need to be allocated per sink instance (applicable only to Docker runtime) inputs | i | | The sink's input topic or topics (multiple topics can be specified as a comma-separated list) name | | | The sink's name namespace | | | The sink's namespace output | o | text | The output format (text,json,yaml) parallelism | | 0 | 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 ram | | 0 | The RAM (in bytes) that need to be allocated per sink instance (applicable only to the process and Docker runtimes) retain-ordering | | false | Sink consumes and sinks messages in order sink-config | | | User defined configs key/values sink-config-file | | | The path to a YAML config file specifying the sink's configuration sink-type | t | | The sink's connector provider subs-name | | | Pulsar source subscription name if user wants a specific subscription-name for input-topic consumer subs-position | | | Pulsar source subscription position if user wants to consume messages from the specified location. Possible Values: [Latest, Earliest] tenant | | | The sink's tenant timeout-ms | | 0 | The message timeout in milliseconds tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication topics-pattern | | | TopicsPattern 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)


delete

Delete a Pulsar IO sink connector

pulsarctl sink delete
--tenant public
--namespace default
--name (the name of Pulsar Sink)

Used For

This command is used for deleting a Pulsar IO sink connector.

Required Permission

This command requires namespace function permissions.

Output

//normal output

Deleted (the name of a Pulsar Sink) successfully

//sink doesn't exist

code: 404 reason: Sink (the name of a Pulsar Sink) doesn't exist

Usage

$ delete

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. name | | | The sink's name namespace | | | The sink's namespace output | o | text | The output format (text,json,yaml) tenant | | | The sink's tenant tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


get

Get the information about a Pulsar IO sink connector

pulsarctl sink get
--tenant public
--namespace default
--name (the name of Pulsar Sink)

Used For

Get the information about a Pulsar IO sink connector

Required Permission

This command requires namespace function permissions.

Output

//normal output

{

"tenant": "public",

"namespace": "default",

"name": "mysql-jdbc-sink",

"className": "org.apache.pulsar.io.jdbc.JdbcAutoSchemaSink",

"inputSpecs": {

"test-jdbc": {

"isRegexPattern": false

}

},

"configs": {

"password": "jdbc",

"jdbcUrl": "jdbc:mysql://127.0.0.1:3306/test_jdbc",

"userName": "root",

"tableName": "test_jdbc"

},

"parallelism": 1,

"processingGuarantees": "ATLEAST_ONCE",

"retainOrdering": false,

"autoAck": true

}

//sink doesn't exist

code: 404 reason: Sink (the name of a Pulsar Sink) doesn't exist

Usage

$ get

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. name | | | The sink's name namespace | | | The sink's namespace output | o | text | The output format (text,json,yaml) tenant | | | The sink's tenant tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


list

Get the list of all the running Pulsar IO sink connectors

pulsarctl sink list
--tenant public
--namespace default

Used For

Get the list of all the running Pulsar IO sink connectors

Required Permission

This command requires namespace function permissions.

Output

//normal output

+--------------------+

| Sink Name |

+--------------------+

| test_sink_name |

+--------------------+

Usage

$ list

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. namespace | | | The sink's namespace output | o | text | The output format (text,json,yaml) tenant | | | The sink's tenant tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


restart

Restart sink instance

pulsarctl sink restart
--tenant public
--namespace default
--name (the name of Pulsar Sink)

Restart sink instance with instance ID

pulsarctl sink restart
--tenant public
--namespace default
--name (the name of Pulsar Sink)
--instance-id 1

Used For

Restart sink instance.

Required Permission

This command requires namespace function permissions.

Output

//normal output

Restarted (the name of a Pulsar Sink) successfully

//sink doesn't exist

code: 404 reason: Sink (the name of a Pulsar Sink) doesn't exist

Usage

$ restart

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. instance-id | | | The sink instanceId (stop all instances if instance-id is not provided) name | | | The sink's name namespace | | | The sink's namespace output | o | text | The output format (text,json,yaml) tenant | | | The sink's tenant tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


start

Start sink instance

pulsarctl sink start
--tenant public
--namespace default
--name (the name of Pulsar Sink)

Starts a stopped sink instance with instance ID

pulsarctl sink start
--tenant public
--namespace default
--name (the name of Pulsar Sink)
--instance-id 1

Used For

This command is used for starting a stopped sink instance.

Required Permission

This command requires namespace function permissions.

Output

//normal output

Started (the name of a Pulsar Sink) successfully

//sink doesn't exist

code: 404 reason: Sink (the name of a Pulsar Sink) doesn't exist

Usage

$ start

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. instance-id | | | The sink instanceId (stop all instances if instance-id is not provided) name | | | The sink's name namespace | | | The sink's namespace output | o | text | The output format (text,json,yaml) tenant | | | The sink's tenant tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


status

Get the current status of a Pulsar Sink

pulsarctl sink status
--tenant public
--namespace default
--name (the name of Pulsar Sink)

Used For

Get the current status of a Pulsar Sink.

Required Permission

This command requires namespace function permissions.

Output

//normal output

{

"numInstances" : 1,

"numRunning" : 1,

"instances" : [ {

"instanceId" : 0,

"status" : {

"running" : true,

"error" : "",

"numRestarts" : 0,

"numReadFromPulsar" : 0,

"numSystemExceptions" : 0,

"latestSystemExceptions" : [ ],

"numSinkExceptions" : 0,

"latestSinkExceptions" : [ ],

"numWrittenToSink" : 0,

"lastReceivedTime" : 0,

"workerId" : "c-standalone-fw-tengdeMBP.lan-8080"

}

} ]

}

//Update contains no change

[✖] code: 400 reason: Update contains no change

//The name of Pulsar Sink doesn't exist, please check the --name args

[✖] code: 404 reason: Sink (your sink name) doesn't exist

Usage

$ status

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. instance-id | | | The sink instanceId (stop all instances if instance-id is not provided) name | | | The sink's name namespace | | | The sink's namespace output | o | text | The output format (text,json,yaml) tenant | | | The sink's tenant tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


stop

Stops function instance

pulsarctl sink stop
--tenant public
--namespace default
--name (the name of Pulsar Sink)

Stops function instance with instance ID

pulsarctl sink stop
--tenant public
--namespace default
--name (the name of Pulsar Sink)
--instance-id 1

Used For

This command is used for stopping sink instance.

Required Permission

This command requires namespace function permissions.

Output

//normal output

Stopped (the name of a Pulsar Sink) successfully

//sink doesn't exist

code: 404 reason: Sink (the name of a Pulsar Sink) doesn't exist

Usage

$ stop

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. instance-id | | | The sink instanceId (stop all instances if instance-id is not provided) name | | | The sink's name namespace | | | The sink's namespace output | o | text | The output format (text,json,yaml) tenant | | | The sink's tenant tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


update

Update a Pulsar IO sink connector

pulsarctl sink update
--tenant public
--namespace default
--name update-source
--archive pulsar-io-kafka-2.4.0.nar
--classname org.apache.pulsar.io.kafka.KafkaBytesSource
--destination-topic-name my-topic
--cpu 2

Update a Pulsar IO sink connector with sink config

pulsarctl sink create
--sink-config "{"publishTopic":"publishTopic", "key":"pulsar"}"
// Other sink parameters

Update a Pulsar IO sink connector with resource

pulsarctl sink create
--ram 5656565656
--disk 8080808080808080
--cpu 5.0
// Other sink parameters

Update a Pulsar IO sink connector with parallelism

pulsarctl sink create
--parallelism 1
// Other sink parameters

Update a Pulsar IO sink connector with schema type

pulsarctl sink create
--schema-type schema.STRING
// Other sink parameters

Used For

Update a Pulsar IO sink connector.

Required Permission

This command requires namespace function permissions.

Output

//normal output

Updated (the name of a Pulsar Sink) successfully

//sink doesn't exist

code: 404 reason: Sink (the name of a Pulsar Sink) doesn't exist

Usage

$ update

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
archive Path 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.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" auto-ack | | false | Whether or not the framework will automatically acknowledge messages bookie-service-url | | | The bookie web service url that pulsarctl connects to. classname | | | The sink's class name if archive is file-url-path (file://) cpu | | 0 | The CPU (in cores) that needs to be allocated per sink instance (applicable only to Docker runtime) custom-schema-inputs | | | The map of input topics to Schema types or class names (as a JSON string) custom-serde-inputs | | | The map of input topics to SerDe class names (as a JSON string) disk | | 0 | The disk (in bytes) that need to be allocated per sink instance (applicable only to Docker runtime) inputs | i | | The sink's input topic or topics (multiple topics can be specified as a comma-separated list) name | | | The sink's name namespace | | | The sink's namespace output | o | text | The output format (text,json,yaml) parallelism | | 0 | 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 ram | | 0 | The RAM (in bytes) that need to be allocated per sink instance (applicable only to the process and Docker runtimes) retain-ordering | | false | Sink consumes and sinks messages in order sink-config | | | User defined configs key/values sink-config-file | | | The path to a YAML config file specifying the sink's configuration sink-type | t | | The sink's connector provider subs-name | | | Pulsar source subscription name if user wants a specific subscription-name for input-topic consumer subs-position | | | Pulsar source subscription position if user wants to consume messages from the specified location. Possible Values: [Latest, Earliest] tenant | | | The sink's tenant timeout-ms | | 0 | The message timeout in milliseconds tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication topics-pattern | | | TopicsPattern 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) update-auth-data | | false | Whether or not to update the auth data


sources

Usage

$ sources


create

Create a Pulsar Source in cluster mode

pulsarctl sources create
--tenant public
--namespace default
--name (the name of Pulsar Sources)
--destination-topic-name kafka-topic
--classname org.apache.pulsar.io.kafka.KafkaBytesSource
--archive pulsar-io-kafka-2.4.0.nar
--source-config-file conf/kafkaSourceConfig.yaml
--parallelism 1

Create a Pulsar Source in cluster mode with pkg URL

pulsarctl source create
--tenant public
--namespace default
--name (the name of Pulsar Source)
--destination-topic-name kafka-topic
--classname org.apache.pulsar.io.kafka.KafkaBytesSource
--archive file://(or http://) + /examples/api-examples.nar

Create a Pulsar Source in cluster mode with schema type

pulsarctl source create
--schema-type schema.STRING
// Other source parameters

Create a Pulsar Source in cluster mode with parallelism

pulsarctl source create
--parallelism 1
// Other source parameters

Create a Pulsar Source in cluster mode with resource

pulsarctl source create
--ram 5656565656
--disk 8080808080808080
--cpu 5.0
// Other source parameters

Create a Pulsar Source in cluster mode with source config

pulsarctl source create
--source-config "{"publishTopic":"publishTopic", "key":"pulsar"}"
// Other source parameters

Create a Pulsar Source in cluster mode with processing guarantees

pulsarctl source create
--processing-guarantees EFFECTIVELY_ONCE
// Other source parameters

Used For

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

Required Permission

This command requires namespace function permissions.

Output

//normal output

Created (the name of a Pulsar Sources) successfully

//source archive not specified, please check --archive arg

[✖] Source archive not specified

//Cannot specify both archive and source-type, please check --archive and --source-type args

[✖] Cannot specify both archive and source-type

Usage

$ create

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
archive a The 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
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. classname | | | The source's class name if archive is file-url-path (file://) cpu | | 0 | The CPU (in cores) that needs to be allocated per source instance (applicable only to Docker runtime) deserialization-classname | | | The SerDe classname for the source destination-topic-name | | | The Pulsar topic to which data is sent disk | | 0 | The disk (in bytes) that need to be allocated per source instance (applicable only to Docker runtime) name | | | The source's name namespace | | | The source's namespace output | o | text | The output format (text,json,yaml) parallelism | | 0 | 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 ram | | 0 | The RAM (in bytes) that need to be allocated per source instance (applicable only to the process and Docker runtimes) 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-config | | | Source config key/values source-config-file | | | he path to a YAML config file specifying the
source-type | t | | The source's connector provider tenant | | | The source's tenant tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


delete

Delete a Pulsar IO source connector

pulsarctl source delete
--tenant public
--namespace default
--name (the name of Pulsar Source)

Used For

This command is used for deleting a Pulsar IO source connector.

Required Permission

This command requires namespace function permissions.

Output

//normal output

Deleted (the name of a Pulsar Source) successfully

//source doesn't exist

code: 404 reason: Source (the name of a Pulsar Source) doesn't exist

Usage

$ delete

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. name | | | The source's name namespace | | | The source's namespace output | o | text | The output format (text,json,yaml) tenant | | | The source's tenant tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


get

Gets the information about a Pulsar IO source connector

pulsarctl source get
--tenant public
--namespace default
--name (the name of Pulsar Source)

Used For

Gets the information about a Pulsar IO source connector

Required Permission

This command requires namespace function permissions.

Output

//normal output

{

"tenant": "public",

"namespace": "default",

"name": "kafka",

"className": "org.apache.pulsar.io.kafka.KafkaBytesSource",

"topicName": "my-topic",

"configs": {

"bootstrapServers": "pulsar-kafka:9092",

"groupId": "test-pulsar-io1",

"topic": "my-topic",

"sessionTimeoutMs": "10000",

"autoCommitEnabled": "false"

},

"parallelism": 1,

"processingGuarantees": "ATLEAST_ONCE"

}

//source doesn't exist

code: 404 reason: Source (the name of a Pulsar Source) doesn't exist

Usage

$ get

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. name | | | The source's name namespace | | | The source's namespace output | o | text | The output format (text,json,yaml) tenant | | | The source's tenant tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


list

List all running Pulsar IO source connectors

pulsarctl source list
--tenant public
--namespace default

Used For

List all running Pulsar IO source connectors

Required Permission

This command requires namespace function permissions.

Output

//normal output

+--------------------+

| Source Name |

+--------------------+

| test_source_name |

+--------------------+

Usage

$ list

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. namespace | | | The source's namespace output | o | text | The output format (text,json,yaml) tenant | | | The source's tenant tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


restart

Restart source instance

pulsarctl source restart
--tenant public
--namespace default
--name (the name of Pulsar Source)

Restart source instance with instance ID

pulsarctl source restart
--tenant public
--namespace default
--name (the name of Pulsar Source)
--instance-id 1

Used For

Restart source instance.

Required Permission

This command requires namespace function permissions.

Output

//normal output

Restarted (the name of a Pulsar Source) successfully

//source doesn't exist

code: 404 reason: Source (the name of a Pulsar Source) doesn't exist

Usage

$ restart

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. instance-id | | | The source instanceId (stop all instances if instance-id is not provided) name | | | The source's name namespace | | | The source's namespace tenant | | | The source's tenant tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


start

Start source instance

pulsarctl source start
--tenant public
--namespace default
--name (the name of Pulsar Source)

Starts a stopped source instance with instance ID

pulsarctl source start
--tenant public
--namespace default
--name (the name of Pulsar Source)
--instance-id 1

Used For

This command is used for starting a stopped source instance.

Required Permission

This command requires namespace function permissions.

Output

//normal output

Started (the name of a Pulsar Source) successfully

//source doesn't exist

code: 404 reason: Source (the name of a Pulsar Source) doesn't exist

Usage

$ start

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. instance-id | | | The source instanceId (stop all instances if instance-id is not provided) name | | | The source's name namespace | | | The source's namespace output | o | text | The output format (text,json,yaml) tenant | | | The source's tenant tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


status

Check the current status of a Pulsar Source

pulsarctl source status
--tenant public
--namespace default
--name (the name of Pulsar Source)

Used For

Check the current status of a Pulsar Source.

Required Permission

This command requires namespace function permissions.

Output

//normal output

{

"numInstances" : 1,

"numRunning" : 1,

"instances" : [ {

"instanceId" : 0,

"status" : {

"running" : true,

"error" : "",

"numRestarts" : 0,

"numReceivedFromSource" : 0,

"numSystemExceptions" : 0,

"latestSystemExceptions" : [ ],

"numSourceExceptions" : 0,

"latestSourceExceptions" : [ ],

"numWritten" : 0,

"lastReceivedTime" : 0,

"workerId" : "c-standalone-fw-7e0cf1b3bf9d-8080"

}

} ]

}

//Update contains no change

[✖] code: 400 reason: Update contains no change

//The name of Pulsar Source doesn't exist, please check the --name args

[✖] code: 404 reason: Source (your source name) doesn't exist

Usage

$ status

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. instance-id | | | The source instanceId (stop all instances if instance-id is not provided) name | | | The source's name namespace | | | The source's namespace output | o | text | The output format (text,json,yaml) tenant | | | The source's tenant tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


stop

Stops source instance

pulsarctl source stop
--tenant public
--namespace default
--name (the name of Pulsar Source)

Stops source instance with instance ID

pulsarctl source stop
--tenant public
--namespace default
--name (the name of Pulsar Source)
--instance-id 1

Used For

This command is used for stopping source instance.

Required Permission

This command requires namespace function permissions.

Output

//normal output

Stopped (the name of a Pulsar Source) successfully

//source doesn't exist

code: 404 reason: Source (the name of a Pulsar Source) doesn't exist

Usage

$ stop

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. instance-id | | | The source instanceId (stop all instances if instance-id is not provided) name | | | The source's name namespace | | | The source's namespace tenant | | | The source's tenant tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


update

Update a Pulsar IO source connector

pulsarctl source update
--tenant public
--namespace default
--name update-source
--archive pulsar-io-kafka-2.4.0.nar
--classname org.apache.pulsar.io.kafka.KafkaBytesSource
--destination-topic-name my-topic
--cpu 2

Update a Pulsar IO source connector with source config

pulsarctl source create
--source-config "{"publishTopic":"publishTopic", "key":"pulsar"}"
// Other source parameters

Update a Pulsar IO source connector with resource

pulsarctl source create
--ram 5656565656
--disk 8080808080808080
--cpu 5.0
// Other source parameters

Update a Pulsar IO source connector with parallelism

pulsarctl source create
--parallelism 1
// Other source parameters

Update a Pulsar IO source connector with schema type

pulsarctl source create
--schema-type schema.STRING
// Other source parameters

Used For

Update a Pulsar IO source connector.

Required Permission

This command requires namespace function permissions.

Output

//normal output

Updated (the name of a Pulsar Source) successfully

//source doesn't exist

code: 404 reason: Source (the name of a Pulsar Source) doesn't exist

Usage

$ update

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
archive a The 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
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. className | | | The source's class name if archive is file-url-path (file://) cpu | | 0 | The CPU (in cores) that needs to be allocated per source instance (applicable only to Docker runtime) deserialization-classname | | | The SerDe classname for the source destination-topic-name | | | The Pulsar topic to which data is sent disk | | 0 | The disk (in bytes) that need to be allocated per source instance (applicable only to Docker runtime) name | | | The source's name namespace | | | The source's namespace parallelism | | 0 | 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 ram | | 0 | The RAM (in bytes) that need to be allocated per source instance (applicable only to the process and Docker runtimes) 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-config | | | Source config key/values source-config-file | | | he path to a YAML config file specifying the
source-type | t | | The source's connector provider tenant | | | The source's tenant tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication update-auth-data | | false | Whether or not to update the auth data


tenants

Usage

$ tenants


create

create a tenant named (tenant-name)

pulsarctl tenants create (tenant-name)

Used For

This command is used for creating a new tenant.

Required Permission

This command requires super-user permissions.

Output

//normal output

Create tenant (tenant-name) successfully

//the tenant name is not specified or the tenant name is specified more than one

[✖] the tenant name is not specified or the tenant name is specified more than one

//the specified tenant has been created

[✖] code: 409 reason: Tenant already exists

Usage

$ create

Flags

Name Shorthand Default Usage
admin-roles r [] Allowed admins to access the tenant
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
allowed-clusters c [] Allowed clusters
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


delete

delete a tenant named (tenant-name)

pulsarctl tenants delete (tenant-name)

Used For

This command is used for deleting an existing tenant.

Required Permission

This command requires super-user permissions.

Output

//normal output

Delete tenant successfully

//the tenant name is not specified or the tenant name is specified more than one

[✖] the tenant name is not specified or the tenant name is specified more than one

//the specified tenant does not exist in the broker

[✖] code: 404 reason: The tenant does not exist

//there has namespace(s) under the tenant (tenant-name)

code: 409 reason: The tenant still has active namespaces

Usage

$ delete

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


get

get the configuration of tenant (tenant-name)

pulsarctl tenants get (tenant-name)

Used For

This command is used for getting the configuration of a tenant.

Required Permission

This command requires super-user permissions.

Output

//normal output

{

"adminRoles": [],

"allowedClusters": [

"standalone"

]

}

//the tenant name is not specified or the tenant name is specified more than one

[✖] the tenant name is not specified or the tenant name is specified more than one

//the specified tenant does not exist in the cluster

[✖] code: 404 reason: Tenant does not exist

Usage

$ get

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


list

list all the existing tenants

pulsarctl tenants list

Used For

This command is used for listing all the existing tenants.

Required Permission

This command requires super-user permissions.

Output

//normal output

+-------------+

| TENANT NAME |

+-------------+

| public |

| sample |

+-------------+

Usage

$ list

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


update

clear the tenant configuration of a tenant

pulsarctl tenant update (tenant-name)

update the admin roles for tenant (tenant-name)

pulsarctl tenants update --admin-roles (admin-A)--admin-roles (admin-B) (tenant-name)

update the allowed cluster list for tenant (tenant-name)

pulsarctl tenants update --allowed-clusters (cluster-A) --allowed-clusters (cluster-B) (tenant-name)

Used For

This command is used for updating the configuration of a tenant.

Required Permission

This command requires super-user permissions.

Output

//normal output

Update tenant [%s] successfully

//the tenant name is not specified or the tenant name is specified more than one

[✖] the tenant name is not specified or the tenant name is specified more than one

//the specified tenant does not exist in

[✖] code: 404 reason: Tenant does not exist

//the flag --admin-roles or --allowed-clusters are not specified

[✖] the admin roles or the allowed clusters is not specified

Usage

$ update

Flags

Name Shorthand Default Usage
admin-roles r [] Allowed admins to access the tenant
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
allowed-clusters c [] Allowed clusters
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


topics

Usage

$ topics


bundle-range

Get namespace bundle range of a topic (topic-name)

pulsarctl topic bundle-range (topic-name)

Used For

This command is used for getting namespace bundle range of a topic (partition).

Required Permission

This command requires super-user permissions.

Output

//normal output

The bundle range of the topic (topic-name) is: (bundle-range)

//the topic name is not specified or the topic name is specified more than one

[✖] the topic name is not specified or the topic name is specified more than one

//the topic name is not in the format of // or

[✖] Invalid short topic name '', it should be in the format of // or

//the topic name is not in the format of :////

[✖] Invalid complete topic name '', it should be in the format of :////

//the topic name is not in the format of //

[✖] Invalid topic name '', it should be in the format of//

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

SCOPE:

non-partitioned topic, a partition of a partitioned topic

Usage

$ bundle-range

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


compact

Compact a persistent topic (topic-name)

pulsarctl topic compact (topic-name)

Compact a partition of a partitioned topic

pulsarctl topic compact --partition (index) (topic-name)

Used For

This command is used for compacting a persistent topic or a partition of a partitioned topic.

Required Permission

This command is requires tenant admin permissions.

Output

//normal output

Sending compact topic (topic-name) request successfully

//the topic name is not specified or the topic name is specified more than one

[✖] the topic name is not specified or the topic name is specified more than one

//the specified topic does not exist

[✖] code: 404 reason: Topic not found

//the topic name is not in the format of // or

[✖] Invalid short topic name '', it should be in the format of // or

//the topic name is not in the format of :////

[✖] Invalid complete topic name '', it should be in the format of :////

//the topic name is not in the format of //

[✖] Invalid topic name '', it should be in the format of//

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

SCOPE:

non-partitioned topic, a partition of a partitioned topic

Usage

$ compact

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) partition | p | -1 | The partitioned topic index value tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


compact-status

Get compaction status of a persistent topic (topic-name)

pulsarctl topic compact-status (topic-name)

Get compaction status of a partition of partitioned topic

pulsarctl topic compact-status --partition (partition) (topic-name)

Used For

This command is used for getting compaction status of a topic or a partition of a partitioned topic.

Required Permission

This command requires tenant admin permissions.

Output

//normal output

Compacting the topic (topic-name) is done successfully

//Compacting the topic (topic-name) is not running

Compacting the topic (topic-name) is not running

//Compacting the topic (topic-name) is running

Compacting the topic (topic-name) is running

//Compacting the topic (topic-name) is done with error

Compacting the topic (topic-name) is done with error

//the topic name is not specified or the topic name is specified more than one

[✖] the topic name is not specified or the topic name is specified more than one

//the specified topic does not exist

[✖] code: 404 reason: Topic not found

//the topic name is not in the format of // or

[✖] Invalid short topic name '', it should be in the format of // or

//the topic name is not in the format of :////

[✖] Invalid complete topic name '', it should be in the format of :////

//the topic name is not in the format of //

[✖] Invalid topic name '', it should be in the format of//

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

SCOPE:

non-partitioned topic, a partition of a partitioned topic

Usage

$ compact-status

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) partition | p | -1 | The partitioned topic index value tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication wait | w | false | Wait for compacting to complete


create

Create a non-partitioned topic (topic-name)

pulsarctl topics create (topic-name) 0

Create a partitioned topic (topic-name) with (partitions-num) partitions

pulsarctl topics create (topic-name) (partition-num)

Used For

This command is used for creating topic.

Required Permission

This command requires namespace admin permissions.

Output

//normal output

Create topic (topic-name) with (partition-num) partitions successfully

//the topic name and(or) the partitions is not specified

[✖] need to specified the topic name and the partitions

//the topic has been created

[✖] code: 409 reason: Partitioned topic already exists

//the topic name is not in the format of // or

[✖] Invalid short topic name '', it should be in the format of // or

//the topic name is not in the format of :////

[✖] Invalid complete topic name '', it should be in the format of :////

//the topic name is not in the format of //

[✖] Invalid topic name '', it should be in the format of//

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

SCOPE:

non-partitioned topic, partitioned topic

Usage

$ create

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


delete

Delete a partitioned topic (topic-name)

pulsarctl topics delete (topic-name)

Delete a non-partitioned topic (topic-name)

pulsarctl topics delete --non-partitioned (topic-name)

Used For

This command is used for deleting an existing topic.

Required Permission

This command requires namespace admin permissions.

Output

//normal output

Delete topic (topic-name) successfully

//the topic name is not specified or the topic name is specified more than one

[✖] the topic name is not specified or the topic name is specified more than one

//the partitioned topic does not exist

[✖] code: 404 reason: Partitioned topic does not exist

//the non-partitioned topic does not exist

[✖] code: 404 reason: Topic not found

//the topic name is not in the format of // or

[✖] Invalid short topic name '', it should be in the format of // or

//the topic name is not in the format of :////

[✖] Invalid complete topic name '', it should be in the format of :////

//the topic name is not in the format of //

[✖] Invalid topic name '', it should be in the format of//

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

SCOPE:

non-partitioned topic, partitioned topic

Usage

$ delete

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. delete-schema | d | false | Delete schema while deleting topic force | f | false | Close all producer/consumer/replicator and delete topic forcefully non-partitioned | n | false | Delete a non-partitioned topic output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


get

Get hte metadata of an exist topic (topic-name) metadata

pulsarctl topics get (topic-name)

Used For

This command is used for getting the metadata of an exist topic.

Required Permission

This command requires namespace admin permissions.

Output

//normal output

{

"partitions": "(partitions)"

}

//the topic name is not specified or the topic name is specified more than one

[✖] the topic name is not specified or the topic name is specified more than one

//the topic name is not in the format of // or

[✖] Invalid short topic name '', it should be in the format of // or

//the topic name is not in the format of :////

[✖] Invalid complete topic name '', it should be in the format of :////

//the topic name is not in the format of //

[✖] Invalid topic name '', it should be in the format of//

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

SCOPE:

non-partitioned topic, partitioned topic, a partition of a partitioned topic

Usage

$ get

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


get-backlog-quotas

Get the backlog quota policy for a topic

pulsarctl topics get-backlog-quotas topic

Used For

Get the backlog quota policy for a topic

Required Permission

This command requires tenant admin permissions.

Output

Usage

$ get-backlog-quotas

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
applied false Get the applied policy for the topic
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


get-compaction-threshold

Get the compaction threshold for a topic

pulsarctl topics get-compaction-threshold [topic]

Used For

Get the compaction threshold for a topic

Required Permission

This command requires tenant admin permissions.

Output

//normal output

The compaction threshold of the topic (topic-name) is (size) byte(s)

Usage

$ get-compaction-threshold

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
applied false Get the applied policy for the topic
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


get-deduplication

Get the deduplication policy for a topic

pulsarctl topics get-deduplication topic

Used For

Get the deduplication policy for a topic

Required Permission

This command requires tenant admin permissions.

Output

//normal output

Get the deduplication policy successfully for [topic]

//the topic name is not specified or the topic name is specified more than one

[✖] the topic name is not specified or the topic name is specified more than one

//the topic name is not in the format of // or

[✖] Invalid short topic name '', it should be in the format of // or

//the topic name is not in the format of :////

[✖] Invalid complete topic name '', it should be in the format of :////

//the topic name is not in the format of //

[✖] Invalid topic name '', it should be in the format of//

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

Usage

$ get-deduplication

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


get-delayed-delivery

Get delayed delivery policy for a topic

pulsarctl topics get-delayed-delivery topic

Used For

Get delayed delivery policy for a topic

Required Permission

This command requires tenant admin permissions.

Output

//normal output

Get delayed delivery policy successfully for [topic]

//the topic name is not specified or the topic name is specified more than one

[✖] the topic name is not specified or the topic name is specified more than one

//the topic name is not in the format of // or

[✖] Invalid short topic name '', it should be in the format of // or

//the topic name is not in the format of :////

[✖] Invalid complete topic name '', it should be in the format of :////

//the topic name is not in the format of //

[✖] Invalid topic name '', it should be in the format of//

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

Usage

$ get-delayed-delivery

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


get-dispatch-rate

Get message dispatch rate for a topic

pulsarctl topics get-dispatch-rate topic

Used For

Get message dispatch rate for a topic

Required Permission

This command requires tenant admin permissions.

Output

//normal output

Get message dispatch rate successfully for [topic]

//the topic name is not specified or the topic name is specified more than one

[✖] the topic name is not specified or the topic name is specified more than one

//the topic name is not in the format of // or

[✖] Invalid short topic name '', it should be in the format of // or

//the topic name is not in the format of :////

[✖] Invalid complete topic name '', it should be in the format of :////

//the topic name is not in the format of //

[✖] Invalid topic name '', it should be in the format of//

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

Usage

$ get-dispatch-rate

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


get-inactive-topic-policies

Get the inactive topic policies on a topic

pulsarctl topics get-inactive-topic-policies [topic]

Used For

Get the inactive topic policies on a topic

Required Permission

This command requires tenant admin permissions.

Output

Usage

$ get-inactive-topic-policies

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
applied false Get the applied policy for the topic
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


get-max-consumers

Get max number of consumers for a topic

pulsarctl topics get-max-consumers topic

Used For

Get max number of consumers for a topic

Required Permission

This command requires tenant admin permissions.

Output

//normal output

Get max number of consumers successfully for [topic]

//the topic name is not specified or the topic name is specified more than one

[✖] the topic name is not specified or the topic name is specified more than one

//the topic name is not in the format of // or

[✖] Invalid short topic name '', it should be in the format of // or

//the topic name is not in the format of :////

[✖] Invalid complete topic name '', it should be in the format of :////

//the topic name is not in the format of //

[✖] Invalid topic name '', it should be in the format of//

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

Usage

$ get-max-consumers

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


get-max-producers

Get max number of producers for a topic

pulsarctl topics get-max-producers topic

Used For

Get max number of producers for a topic

Required Permission

This command requires tenant admin permissions.

Output

//normal output

Get max number of producers successfully for [topic]

//the topic name is not specified or the topic name is specified more than one

[✖] the topic name is not specified or the topic name is specified more than one

//the topic name is not in the format of // or

[✖] Invalid short topic name '', it should be in the format of // or

//the topic name is not in the format of :////

[✖] Invalid complete topic name '', it should be in the format of :////

//the topic name is not in the format of //

[✖] Invalid topic name '', it should be in the format of//

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

Usage

$ get-max-producers

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


get-max-unacked-messages-per-consumer

Get max unacked messages per consumer for a topic

pulsarctl topics get-max-unacked-messages-per-consumer topic

Used For

Get max unacked messages per consumer for a topic

Required Permission

This command requires tenant admin permissions.

Output

//normal output

Get max unacked messages per consumer successfully for [topic]

//the topic name is not specified or the topic name is specified more than one

[✖] the topic name is not specified or the topic name is specified more than one

//the topic name is not in the format of // or

[✖] Invalid short topic name '', it should be in the format of // or

//the topic name is not in the format of :////

[✖] Invalid complete topic name '', it should be in the format of :////

//the topic name is not in the format of //

[✖] Invalid topic name '', it should be in the format of//

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

Usage

$ get-max-unacked-messages-per-consumer

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


get-max-unacked-messages-per-subscription

Get max unacked messages per subscription for a topic

pulsarctl topics get-max-unacked-messages-per-subscription topic

Used For

Get max unacked messages per subscription for a topic

Required Permission

This command requires tenant admin permissions.

Output

//normal output

Get max unacked messages per subscription successfully for [topic]

//the topic name is not specified or the topic name is specified more than one

[✖] the topic name is not specified or the topic name is specified more than one

//the topic name is not in the format of // or

[✖] Invalid short topic name '', it should be in the format of // or

//the topic name is not in the format of :////

[✖] Invalid complete topic name '', it should be in the format of :////

//the topic name is not in the format of //

[✖] Invalid topic name '', it should be in the format of//

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

Usage

$ get-max-unacked-messages-per-subscription

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


get-message-ttl

Get message TTL settings of a topic

pulsarctl topics get-message-ttl topic

Used For

Get message TTL settings of a topic

Required Permission

This command requires tenant admin permissions.

Output

//normal output

(ttl-value)

//the topic name is not specified or the topic name is specified more than one

[✖] the topic name is not specified or the topic name is specified more than one

//the topic name is not in the format of // or

[✖] Invalid short topic name '', it should be in the format of // or

//the topic name is not in the format of :////

[✖] Invalid complete topic name '', it should be in the format of :////

//the topic name is not in the format of //

[✖] Invalid topic name '', it should be in the format of//

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

Usage

$ get-message-ttl

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


get-permissions

Get the permissions of a topic (topic-name)

pulsarctl topic get-permissions (topic-name)

Used For

This command is used for getting the permissions of a topic.

Required Permission

This command requires namespace admin permissions.

Output

//normal output

{

"": [

""

]

}

//the topic name is not specified or the topic name is specified more than one

[✖] the topic name is not specified or the topic name is specified more than one

//the topic name is not in the format of // or

[✖] Invalid short topic name '', it should be in the format of // or

//the topic name is not in the format of :////

[✖] Invalid complete topic name '', it should be in the format of :////

//the topic name is not in the format of //

[✖] Invalid topic name '', it should be in the format of//

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

SCOPE:

non-partitioned topic, a partition of a partitioned topic, partitioned topic

Usage

$ get-permissions

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


get-persistence

Get persistence for a topic

pulsarctl topic get-persistence (topic-name)

Used For

Get persistence for a topic

Required Permission

This command requires namespace admin persistence.

Output

//normal output

(persistence-value)

//the topic name is not specified or the topic name is specified more than one

[✖] the topic name is not specified or the topic name is specified more than one

//the topic name is not in the format of // or

[✖] Invalid short topic name '', it should be in the format of // or

//the topic name is not in the format of :////

[✖] Invalid complete topic name '', it should be in the format of :////

//the topic name is not in the format of //

[✖] Invalid topic name '', it should be in the format of//

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

Usage

$ get-persistence

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


get-publish-rate

Get message publish rate for a topic

pulsarctl topics get-publish-rate topic

Used For

Get message publish rate for a topic

Required Permission

This command requires tenant admin permissions.

Output

//normal output

Get message publish rate successfully for [topic]

//the topic name is not specified or the topic name is specified more than one

[✖] the topic name is not specified or the topic name is specified more than one

//the topic name is not in the format of // or

[✖] Invalid short topic name '', it should be in the format of // or

//the topic name is not in the format of :////

[✖] Invalid complete topic name '', it should be in the format of :////

//the topic name is not in the format of //

[✖] Invalid topic name '', it should be in the format of//

//topic-level policy is not enabled

[✖] code: 405 reason: Topic level policy is disabled, please enable broker configs of systemTopicEnabled and topicLevelPoliciesEnabled

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

Usage

$ get-publish-rate

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


get-retention

Get the retention policy for a topic

pulsarctl topics get-retention tenant/namespace/topic

Used For

Get the retention policy for a topic

Required Permission

This command requires tenant admin permissions.

Output

//normal output

{

"RetentionTimeInMinutes": 0,

"RetentionSizeInMB": 0

}

//you must specify a tenant/namespace/topic name, please check if the tenant/namespace/topic name is provided

[✖] the topic name is not specified or the topic name is specified more than one

//the tenant does not exist

[✖] code: 404 reason: Tenant does not exist

//the namespace does not exist

[✖] code: 404 reason: Namespace (tenant/namespace) does not exist

Usage

$ get-retention

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
applied a false Get the applied policy for the topic
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


grant-permissions

Grant permissions to a client on a single topic (topic-name)

pulsarctl topic grant-permissions --role (role) --actions (action-1) --actions (action-2) (topic-name)

Used For

This command is used for granting permissions to a client role on a topic.

Required Permission

This command requires namespace admin permissions.

Output

//normal output

Grant role %s and actions %v to the topic %s successfully

//the topic name is not specified or the topic name is specified more than one

[✖] the topic name is not specified or the topic name is specified more than one

//the specified role is empty

Invalid role name

//the specified actions is not allowed.

The auth action only can be specified as 'produce', 'consume', 'sources', 'sinks', 'packages', or 'functions'. Invalid auth action '(actions)'

//the topic name is not in the format of // or

[✖] Invalid short topic name '', it should be in the format of // or

//the topic name is not in the format of :////

[✖] Invalid complete topic name '', it should be in the format of :////

//the topic name is not in the format of //

[✖] Invalid topic name '', it should be in the format of//

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

SCOPE:

non-partitioned topic, a partition of a partitioned topic, partitioned topic

Usage

$ grant-permissions

Flags

Name Shorthand Default Usage
actions [] Actions to be granted (produce,consume,sources,sinks,functions,packages)
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) role | | | Client role to which grant permissions tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


internal-info

Get the internal info of a topic

pulsarctl topic internal-info <topic-name>

Used For

This command is used for getting the internal info of a topic which has messages or subscriptions.

Required Permission

This command requires tenant admin permissions.

Output

//normal output

{

"version": 1,

"creationDate": "",

"modificationData": "",

"ledgers": [

{

"ledgerId": 0,

"entries": 0,

"size": 0,

"offloaded": false

}

],

"terminatedPosition": {

"ledgerId": 0,

"entryId": 0

},

"cursors": {

"hello": {

"version": 0,

"creationDate": "",

"modificationDate": "",

"cursorsLedgerId": 0,

"markDelete": {

"ledgerId": 0,

"entryId": 0

},

"individualDeletedMessages": null,

"Properties": null

}

}

}

//the topic name is not specified or the topic name is specified more than one

[✖] the topic name is not specified or the topic name is specified more than one

//the specified topic does not exist

[✖] code: 500 reason: Unknown error

//the topic name is not in the format of // or

[✖] Invalid short topic name '', it should be in the format of // or

//the topic name is not in the format of :////

[✖] Invalid complete topic name '', it should be in the format of :////

//the topic name is not in the format of //

[✖] Invalid topic name '', it should be in the format of//

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

SCOPE:

non-partitioned topic, a partition of a partitioned topic

Usage

$ internal-info

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


internal-stats

Get internal stats for an existing non-partitioned-topic (topic-name)

pulsarctl topic internal-stats (topic-name)

Get internal stats for a partition of a partitioned topic

pulsarctl topic internal-stats --partition (partition) (topic-name)

Used For

This command is used for getting the internal stats for a non-partitioned topic or a partition of a partitioned topic.

Required Permission

This command requires namespace admin permissions.

Output

//normal output

{

"entriesAddedCounter": 0,

"numberOfEntries": 0,

"totalSize": 0,

"currentLedgerEntries": 0,

"currentLedgerSize": 0,

"lastLedgerCreatedTimestamp": "",

"lastLedgerCreationFailureTimestamp": "",

"waitingCursorsCount": 0,

"pendingAddEntriesCount": 0,

"lastConfirmedEntry": "",

"state": "",

"ledgers": [

{

"ledgerId": 0,

"entries": 0,

"size": 0,

"offloaded": false

}

],

"cursors": {}

}

//the topic name is not specified or the topic name is specified more than one

[✖] the topic name is not specified or the topic name is specified more than one

//the specified topic is not exist or the specified topic is a partitioned topic

[✖] code: 404 reason: Topic not found

//the topic name is not in the format of // or

[✖] Invalid short topic name '', it should be in the format of // or

//the topic name is not in the format of :////

[✖] Invalid complete topic name '', it should be in the format of :////

//the topic name is not in the format of //

[✖] Invalid topic name '', it should be in the format of//

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

SCOPE:

non-partitioned topic, a partition of a partitioned topic, partitioned topic

Usage

$ internal-stats

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) partition | p | -1 | The partitioned topic index value tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


last-message-id

Get the last message id of a topic (persistent-topic-name)

pulsarctl topic last-message-id (persistent-topic-name)

Get the last message id of a partition of a partitioned topic (topic-name)

pulsarctl topic last-message-id --partition (partition) (topic-name)

Used For

This command is used for getting the last message id of a topic (partition).

Required Permission

This command requires tenant admin permissions.

Output

//normal output

{

"LedgerID": 0,

"EntryID": 0,

"PartitionedIndex": 0

}

//the topic name is not specified or the topic name is specified more than one

[✖] the topic name is not specified or the topic name is specified more than one

//the topic (persistent-topic-name) does not exist in the cluster

[✖] code: 404 reason: Topic not found

//the topic (persistent-topic-name) does not a persistent topic

[✖] code: 405 reason: GetLastMessageId on a non-persistent topic is not allowed

//the topic name is not in the format of // or

[✖] Invalid short topic name '', it should be in the format of // or

//the topic name is not in the format of :////

[✖] Invalid complete topic name '', it should be in the format of :////

//the topic name is not in the format of //

[✖] Invalid topic name '', it should be in the format of//

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

SCOPE:

non-partitioned topic, a partition of a partitioned topic

Usage

$ last-message-id

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) partition | p | -1 | The partitioned topic index value tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


list

List all exist topics under the namespace(tenant/namespace)

pulsarctl topics list (tenant/namespace)

Used For

This command is used for listing all exist topics under the specified namespace.

Required Permission

This command requires admin permissions.

Output

//normal output

+----------------------------------------------------------+---------------+

| TOPIC NAME | PARTITIONED ? |

+----------------------------------------------------------+---------------+

+----------------------------------------------------------+---------------+

//the namespace is not specified

[✖] the namespace name is not specified or the namespace name is specified more than one

//the tenant of the namespace does not exist

[✖] code: 404 reason: Tenant does not exist

//the namespace does not exist

[✖] code: 404 reason: Namespace does not exist

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

SCOPE:

non-partitioned topic, partitioned topic

Usage

$ list

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


lookup

Lookup the owner broker of the topic (topic-name)

pulsarctl topic lookup (topic-name)

Used For

This command is used for looking up the owner broker of a topic.

Required Permission

This command does not require permissions.

Output

//

{

"brokerUlr": "",

"brokerUrlTls": "",

"httpUrl": "",

"httpUrlTls": "",

}

//the topic name is not specified or the topic name is specified more than one

[✖] the topic name is not specified or the topic name is specified more than one

//the topic name is not in the format of // or

[✖] Invalid short topic name '', it should be in the format of // or

//the topic name is not in the format of :////

[✖] Invalid complete topic name '', it should be in the format of :////

//the topic name is not in the format of //

[✖] Invalid topic name '', it should be in the format of//

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

SCOPE:

non-partitioned topic, a partition of a partitioned topic, partitioned topic

Usage

$ lookup

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


offload

Trigger offloading the messages of a topic (topic-name) to a long-term storage and keep the configured amount of data in BookKeeper only (e.g. 10M, 5G, the unit is byte if the specified value without the unit.)

pulsarctl topic offload (topic-name) (threshold)

Used For

This command is used for triggering offloading the messages of a topic to a long-term storage (e.g. Amazon S3)

Required Permission

This command requires tenant admin permissions.

Output

//normal output

Trigger offloading the data before the message (messageId) of the topic (topic-name) successfully

//noting to offload

Nothing to offload

//the topic name is not specified or the offload threshold is not specified

[✖] only two arguments are allowed to be used as names

//the specified topic does not exist

[✖] code: 404 reason: Topic not found

//the topic name is not in the format of // or

[✖] Invalid short topic name '', it should be in the format of // or

//the topic name is not in the format of :////

[✖] Invalid complete topic name '', it should be in the format of :////

//the topic name is not in the format of //

[✖] Invalid topic name '', it should be in the format of//

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

SCOPE:

non-partitioned topic, a partition of a partitioned topic

Usage

$ offload

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


offload-status

Check the status of offloading data from a topic (persistent-topic-name) to a long-term storage

pulsarctl topic offload-status (persistent-topic-name)

Wait for offloading to complete

pulsarctl topic offload-status --wait (persistent-topic-name)

Used For

This command is used for checking the status of offloading data from a persistent topic to a long-term storage.

Required Permission

This command requires tenant admin permissions.

Output

//normal output

Offloading topic (topic-name) data is done successfully

//Offloading topic is not running

Offloading topic (topic-name) data is not running

//Offloading topic is running

Offloading topic (topic-name) data is running

//Offloading topic with error

Offloading topic (topic-name) data is done with error (error-msg)

//the topic name is not specified or the topic name is specified more than one

[✖] the topic name is not specified or the topic name is specified more than one

//the specified topic does not exist

[✖] code: 404 reason: Topic not found

//the topic name is not in the format of // or

[✖] Invalid short topic name '', it should be in the format of // or

//the topic name is not in the format of :////

[✖] Invalid complete topic name '', it should be in the format of :////

//the topic name is not in the format of //

[✖] Invalid topic name '', it should be in the format of//

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

SCOPE:

non-partitioned topic, a partition of a partitioned topic

Usage

$ offload-status

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication wait | w | false | Wait for offloading to complete


remove-backlog-quota

Remove a backlog quota policy from a topic

pulsarctl topics remove-backlog-quota topic -t <destination_storage|message_age>

Used For

Remove a backlog quota policy from a topic

Required Permission

This command requires tenant admin permissions.

Output

//normal output

Remove backlog quota successfully for [topic]

Usage

$ remove-backlog-quota

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication type | t | destination_storage | Backlog quota type to remove


remove-compaction-threshold

Remove the compaction threshold for a topic

pulsarctl topics remove-compaction-threshold topic

Used For

Remove the compaction threshold for a topic

Required Permission

This command requires tenant admin permissions.

Output

//normal output

Successfully remove compaction threshold for topic (topic-name)

Usage

$ remove-compaction-threshold

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


remove-deduplication

Remove the deduplication policy for a topic

pulsarctl topics remove-deduplication topic

Used For

Remove the deduplication policy for a topic

Required Permission

This command requires tenant admin permissions.

Output

//normal output

Remove the deduplication policy successfully for [topic]

//the topic name is not specified or the topic name is specified more than one

[✖] the topic name is not specified or the topic name is specified more than one

//the topic name is not in the format of // or

[✖] Invalid short topic name '', it should be in the format of // or

//the topic name is not in the format of :////

[✖] Invalid complete topic name '', it should be in the format of :////

//the topic name is not in the format of //

[✖] Invalid topic name '', it should be in the format of//

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

Usage

$ remove-deduplication

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


remove-delayed-delivery

Remove delayed delivery policy for a topic

pulsarctl topics remove-delayed-delivery topic

Used For

Remove delayed delivery policy for a topic

Required Permission

This command requires tenant admin permissions.

Output

//normal output

Remove delayed delivery policy successfully for [topic]

//the topic name is not specified or the topic name is specified more than one

[✖] the topic name is not specified or the topic name is specified more than one

//the topic name is not in the format of // or

[✖] Invalid short topic name '', it should be in the format of // or

//the topic name is not in the format of :////

[✖] Invalid complete topic name '', it should be in the format of :////

//the topic name is not in the format of //

[✖] Invalid topic name '', it should be in the format of//

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

Usage

$ remove-delayed-delivery

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


remove-dispatch-rate

Remove message dispatch rate for a topic

pulsarctl topics remove-dispatch-rate topic

Used For

Remove message dispatch rate for a topic

Required Permission

This command requires tenant admin permissions.

Output

//normal output

Remove message dispatch rate successfully for [topic]

//the topic name is not specified or the topic name is specified more than one

[✖] the topic name is not specified or the topic name is specified more than one

//the topic name is not in the format of // or

[✖] Invalid short topic name '', it should be in the format of // or

//the topic name is not in the format of :////

[✖] Invalid complete topic name '', it should be in the format of :////

//the topic name is not in the format of //

[✖] Invalid topic name '', it should be in the format of//

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

Usage

$ remove-dispatch-rate

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


remove-dispatch-rate

Remove message dispatch rate for a topic

pulsarctl topics remove-dispatch-rate topic

Used For

Remove message dispatch rate for a topic

Required Permission

This command requires tenant admin permissions.

Output

//normal output

Remove message dispatch rate successfully for [topic]

//the topic name is not specified or the topic name is specified more than one

[✖] the topic name is not specified or the topic name is specified more than one

//the topic name is not in the format of // or

[✖] Invalid short topic name '', it should be in the format of // or

//the topic name is not in the format of :////

[✖] Invalid complete topic name '', it should be in the format of :////

//the topic name is not in the format of //

[✖] Invalid topic name '', it should be in the format of//

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

Usage

$ remove-dispatch-rate

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


remove-inactive-topic-policies

Remove inactive topic policies from a topic

pulsarctl topics remove-inactive-topic-policies [topic]

Used For

Remove inactive topic policies from a topic

Required Permission

This command requires tenant admin permissions.

Output

Usage

$ remove-inactive-topic-policies

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


remove-max-consumers

Remove max number of consumers for a topic

pulsarctl topics remove-max-consumers topic

Used For

Remove max number of consumers for a topic

Required Permission

This command requires tenant admin permissions.

Output

//normal output

Remove max number of consumers successfully for [topic]

//the topic name is not specified or the topic name is specified more than one

[✖] the topic name is not specified or the topic name is specified more than one

//the topic name is not in the format of // or

[✖] Invalid short topic name '', it should be in the format of // or

//the topic name is not in the format of :////

[✖] Invalid complete topic name '', it should be in the format of :////

//the topic name is not in the format of //

[✖] Invalid topic name '', it should be in the format of//

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

Usage

$ remove-max-consumers

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


remove-max-producers

Remove max number of producers for a topic

pulsarctl topics remove-max-producers topic

Used For

Remove max number of producers for a topic

Required Permission

This command requires tenant admin permissions.

Output

//normal output

Remove max number of producers successfully for [topic]

//the topic name is not specified or the topic name is specified more than one

[✖] the topic name is not specified or the topic name is specified more than one

//the topic name is not in the format of // or

[✖] Invalid short topic name '', it should be in the format of // or

//the topic name is not in the format of :////

[✖] Invalid complete topic name '', it should be in the format of :////

//the topic name is not in the format of //

[✖] Invalid topic name '', it should be in the format of//

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

Usage

$ remove-max-producers

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


remove-max-unacked-messages-per-consumer

Remove max unacked messages per consumer for a topic

pulsarctl topics remove-max-unacked-messages-per-consumer topic

Used For

Remove max unacked messages per consumer for a topic

Required Permission

This command requires tenant admin permissions.

Output

//normal output

Remove max unacked messages per consumer successfully for [topic]

//the topic name is not specified or the topic name is specified more than one

[✖] the topic name is not specified or the topic name is specified more than one

//the topic name is not in the format of // or

[✖] Invalid short topic name '', it should be in the format of // or

//the topic name is not in the format of :////

[✖] Invalid complete topic name '', it should be in the format of :////

//the topic name is not in the format of //

[✖] Invalid topic name '', it should be in the format of//

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

Usage

$ remove-max-unacked-messages-per-consumer

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


remove-max-unacked-messages-per-subscription

Remove max unacked messages per subscription for a topic

pulsarctl topics remove-max-unacked-messages-per-subscription topic

Used For

Remove max unacked messages per subscription for a topic

Required Permission

This command requires tenant admin permissions.

Output

//normal output

Remove max unacked messages per subscription successfully for [topic]

//the topic name is not specified or the topic name is specified more than one

[✖] the topic name is not specified or the topic name is specified more than one

//the topic name is not in the format of // or

[✖] Invalid short topic name '', it should be in the format of // or

//the topic name is not in the format of :////

[✖] Invalid complete topic name '', it should be in the format of :////

//the topic name is not in the format of //

[✖] Invalid topic name '', it should be in the format of//

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

Usage

$ remove-max-unacked-messages-per-subscription

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


remove-message-ttl

Remove Message TTL for a topic

pulsarctl topics remove-message-ttl topic

Used For

Remove Message TTL for a topic

Required Permission

This command requires tenant admin permissions.

Output

//normal output

Remove message TTL successfully for [topic]

//the topic name is not specified or the topic name is specified more than one

[✖] the topic name is not specified or the topic name is specified more than one

//the topic name is not in the format of // or

[✖] Invalid short topic name '', it should be in the format of // or

//the topic name is not in the format of :////

[✖] Invalid complete topic name '', it should be in the format of :////

//the topic name is not in the format of //

[✖] Invalid topic name '', it should be in the format of//

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

Usage

$ remove-message-ttl

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


remove-persistence

Remove persistence for a topic

pulsarctl topics remove-persistence topic

Used For

Remove persistence for a topic

Required Permission

This command requires tenant admin permissions.

Output

//normal output

Remove persistence successfully for [topic]

//the topic name is not specified or the topic name is specified more than one

[✖] the topic name is not specified or the topic name is specified more than one

//the topic name is not in the format of // or

[✖] Invalid short topic name '', it should be in the format of // or

//the topic name is not in the format of :////

[✖] Invalid complete topic name '', it should be in the format of :////

//the topic name is not in the format of //

[✖] Invalid topic name '', it should be in the format of//

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

Usage

$ remove-persistence

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


remove-publish-rate

Remove message publish rate for a topic

pulsarctl topics remove-publish-rate topic

Used For

Remove message publish rate for a topic

Required Permission

This command requires tenant admin permissions.

Output

//normal output

Remove message publish rate successfully for [topic]

//the topic name is not specified or the topic name is specified more than one

[✖] the topic name is not specified or the topic name is specified more than one

//the topic name is not in the format of // or

[✖] Invalid short topic name '', it should be in the format of // or

//the topic name is not in the format of :////

[✖] Invalid complete topic name '', it should be in the format of :////

//the topic name is not in the format of //

[✖] Invalid topic name '', it should be in the format of//

//topic-level policy is not enabled

[✖] code: 405 reason: Topic level policy is disabled, please enable broker configs of systemTopicEnabled and topicLevelPoliciesEnabled

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

Usage

$ remove-publish-rate

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


remove-retention

Remove the retention policy for a topic

pulsarctl topics remove-retention tenant/namespace/topic

Used For

Remove the retention policy for a topic

Required Permission

This command requires tenant admin permissions.

Output

//normal output

Remove the retention policy for a [topic] successfully

//you must specify a tenant/namespace/topic name, please check if the tenant/namespace/topic name is provided

[✖] the topic name is not specified or the topic name is specified more than one

//the tenant does not exist

[✖] code: 404 reason: Tenant does not exist

//the namespace does not exist

[✖] code: 404 reason: Namespace (tenant/namespace) does not exist

Usage

$ remove-retention

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


revoke-permissions

Revoke permissions of a topic (topic-name)

pulsarctl topic revoke-permissions --role (role) (topic-name)

Used For

This command is used for revoking a client role permissions on a topic.

Required Permission

This command requires namespace admin permissions.

Output

//normal output

Revoke permissions for the role (role) of the topic (topic-name) successfully

//the specified role is empty

Invalid role name

//the topic name is not specified or the topic name is specified more than one

[✖] the topic name is not specified or the topic name is specified more than one

//the topic name is not in the format of // or

[✖] Invalid short topic name '', it should be in the format of // or

//the topic name is not in the format of :////

[✖] Invalid complete topic name '', it should be in the format of :////

//the topic name is not in the format of //

[✖] Invalid topic name '', it should be in the format of//

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

SCOPE:

non-partitioned topic, a partition of a partitioned topic, partitioned topic

Usage

$ revoke-permissions

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. role | | | Client role to which revoke permissions tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


set-backlog-quota

Set a backlog quota policy for a topic

pulsarctl topics set-backlog-quota topic
--limit-size 16G
--limit-time -1
--policy <producer_request_hold|producer_exception|consumer_backlog_eviction>
--type <destination_storage|message_age>

Used For

Set a backlog quota policy for a topic

Required Permission

This command requires tenant admin permissions.

Output

//normal output

Set backlog quota successfully for [topic]

Usage

$ set-backlog-quota

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. limit-size | | | Size limit (eg: 10M, 16G) limit-time | | -1 | Time limit in seconds output | o | text | The output format (text,json,yaml) policy | p | | Retention policy to enforce when the limit is reached. Valid options are: [producer_request_hold, producer_exception, consumer_backlog_eviction] tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication type | t | destination_storage | Backlog quota type to set. Valid options are: [destination_storage, message_age]


set-compaction-threshold

Set the compaction threshold for a topic

pulsarctl topics set-compaction-threshold topic --threshold 3T

Used For

Set the compaction threshold for a topic

Required Permission

This command requires tenant admin permissions.

Output

//normal output

Successfully set compaction threshold to (size) for topic (topic-name)

Usage

$ set-compaction-threshold

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) threshold | t | 0 | Maximum number of bytes in a topic backlog before compaction is triggered (eg: 10M, 16G, 3T). 0 disables automatic compaction tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


set-deduplication

Set the deduplication policy for a topic

pulsarctl topics set-deduplication topic -e

Used For

Set the deduplication policy for a topic

Required Permission

This command requires tenant admin permissions.

Output

//normal output

Set the deduplication policy successfully for [topic]

//the topic name is not specified or the topic name is specified more than one

[✖] the topic name is not specified or the topic name is specified more than one

//the topic name is not in the format of // or

[✖] Invalid short topic name '', it should be in the format of // or

//the topic name is not in the format of :////

[✖] Invalid complete topic name '', it should be in the format of :////

//the topic name is not in the format of //

[✖] Invalid topic name '', it should be in the format of//

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

Usage

$ set-deduplication

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. disable | d | false | Disable deduplication enable | e | false | Enable deduplication output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


set-delayed-delivery

Set delayed delivery policy for a topic

pulsarctl topics set-delayed-delivery topic -t 10s -e

Used For

Set delayed delivery policy for a topic

Required Permission

This command requires tenant admin permissions.

Output

//normal output

Set delayed delivery policy successfully for [topic]

//the topic name is not specified or the topic name is specified more than one

[✖] the topic name is not specified or the topic name is specified more than one

//the topic name is not in the format of // or

[✖] Invalid short topic name '', it should be in the format of // or

//the topic name is not in the format of :////

[✖] Invalid complete topic name '', it should be in the format of :////

//the topic name is not in the format of //

[✖] Invalid topic name '', it should be in the format of//

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

Usage

$ set-delayed-delivery

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. disable | d | false | Disable delayed delivery messages enable | e | false | Enable delayed delivery messages output | o | text | The output format (text,json,yaml) time | t | 1s | The tick time for when retrying on delayed delivery messages, affecting the accuracy of the delivery time compared to the scheduled time. (eg: 1s, 10s, 1m, 5h, 3d) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


set-dispatch-rate

Set message dispatch rate for a topic

pulsarctl topics set-dispatch-rate topic --msg-dispatch-rate 4 --byte-dispatch-rate 5 --dispatch-rate-period 6 --relative-to-publish-rate

Used For

Set message dispatch rate for a topic

Required Permission

This command requires tenant admin permissions.

Output

//normal output

Set message dispatch rate successfully for [topic]

//the topic name is not specified or the topic name is specified more than one

[✖] the topic name is not specified or the topic name is specified more than one

//the topic name is not in the format of // or

[✖] Invalid short topic name '', it should be in the format of // or

//the topic name is not in the format of :////

[✖] Invalid complete topic name '', it should be in the format of :////

//the topic name is not in the format of //

[✖] Invalid topic name '', it should be in the format of//

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

Usage

$ set-dispatch-rate

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. byte-dispatch-rate | | -1 | byte-dispatch-rate (default -1 will be overwrite if not passed) dispatch-rate-period | | 1 | dispatch-rate-period in second type (default 1 second will be overwrite if not passed) msg-dispatch-rate | | -1 | message-dispatch-rate (default -1 will be overwrite if not passed) output | o | text | The output format (text,json,yaml) relative-to-publish-rate | | false | dispatch rate relative to publish-rate (if publish-relative flag is enabled then broker will apply throttling value to (publish-rate + dispatch rate)) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


set-dispatch-rate

Set message dispatch rate for a topic

pulsarctl topics set-dispatch-rate topic --msg-dispatch-rate 4 --byte-dispatch-rate 5 --dispatch-rate-period 6 --relative-to-publish-rate

Used For

Set message dispatch rate for a topic

Required Permission

This command requires tenant admin permissions.

Output

//normal output

Set message dispatch rate successfully for [topic]

//the topic name is not specified or the topic name is specified more than one

[✖] the topic name is not specified or the topic name is specified more than one

//the topic name is not in the format of // or

[✖] Invalid short topic name '', it should be in the format of // or

//the topic name is not in the format of :////

[✖] Invalid complete topic name '', it should be in the format of :////

//the topic name is not in the format of //

[✖] Invalid topic name '', it should be in the format of//

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

Usage

$ set-dispatch-rate

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. byte-dispatch-rate | | -1 | byte-dispatch-rate (default -1 will be overwrite if not passed) dispatch-rate-period | | 1 | dispatch-rate-period in second type (default 1 second will be overwrite if not passed) msg-dispatch-rate | | -1 | message-dispatch-rate (default -1 will be overwrite if not passed) output | o | text | The output format (text,json,yaml) relative-to-publish-rate | | false | dispatch rate relative to publish-rate (if publish-relative flag is enabled then broker will apply throttling value to (publish-rate + dispatch rate)) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


set-inactive-topic-policies

Set the inactive topic policies on a topic

pulsarctl topics set-inactive-topic-policies [topic]
--enable-delete-while-inactive true
--max-inactive-duration 1h
--delete-mode delete_when_no_subscriptions

Used For

Set the inactive topic policies on a topic

Required Permission

This command requires tenant admin permissions.

Output

Usage

$ set-inactive-topic-policies

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. delete-mode | m | | Mode of delete inactive topic, Valid options are: [delete_when_no_subscriptions, delete_when_subscriptions_caught_up] enable-delete-while-inactive | e | false | Control whether deletion is enabled while inactive max-inactive-duration | t | | Max duration of topic inactivity in seconds, topics that are inactive for longer than this value will be deleted (eg: 1s, 10s, 1m, 5h, 3d) output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


set-max-consumers

Set max number of consumers for a topic

pulsarctl topics set-max-consumers topic -c 10

Used For

Set max number of consumers for a topic

Required Permission

This command requires tenant admin permissions.

Output

//normal output

Set max number of consumers successfully for [topic]

//the topic name is not specified or the topic name is specified more than one

[✖] the topic name is not specified or the topic name is specified more than one

//the topic name is not in the format of // or

[✖] Invalid short topic name '', it should be in the format of // or

//the topic name is not in the format of :////

[✖] Invalid complete topic name '', it should be in the format of :////

//the topic name is not in the format of //

[✖] Invalid topic name '', it should be in the format of//

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

Usage

$ set-max-consumers

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. max-consumers | c | 0 | Max consumers for a topic output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


set-max-producers

Set max number of producers for a topic

pulsarctl topics set-max-producers topic -p 10

Used For

Set max number of producers for a topic

Required Permission

This command requires tenant admin permissions.

Output

//normal output

Set max number of producers successfully for [topic]

//the topic name is not specified or the topic name is specified more than one

[✖] the topic name is not specified or the topic name is specified more than one

//the topic name is not in the format of // or

[✖] Invalid short topic name '', it should be in the format of // or

//the topic name is not in the format of :////

[✖] Invalid complete topic name '', it should be in the format of :////

//the topic name is not in the format of //

[✖] Invalid topic name '', it should be in the format of//

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

Usage

$ set-max-producers

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. max-producers | p | 0 | Max producers for a topic output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


set-max-unacked-messages-per-consumer

Set max unacked messages per consumer for a topic

pulsarctl topics set-max-unacked-messages-per-consumer topic -m 10

Used For

Set max unacked messages per consumer for a topic

Required Permission

This command requires tenant admin permissions.

Output

//normal output

Set max unacked messages per consumer successfully for [topic]

//the topic name is not specified or the topic name is specified more than one

[✖] the topic name is not specified or the topic name is specified more than one

//the topic name is not in the format of // or

[✖] Invalid short topic name '', it should be in the format of // or

//the topic name is not in the format of :////

[✖] Invalid complete topic name '', it should be in the format of :////

//the topic name is not in the format of //

[✖] Invalid topic name '', it should be in the format of//

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

Usage

$ set-max-unacked-messages-per-consumer

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. maxNum | m | 0 | Max unacked messages per consumer for a topic output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


set-max-unacked-messages-per-subscription

Set max unacked messages per subscription for a topic

pulsarctl topics set-max-unacked-messages-per-subscription topic -m 10

Used For

Set max unacked messages per subscription for a topic

Required Permission

This command requires tenant admin permissions.

Output

//normal output

Set max unacked messages per subscription successfully for [topic]

//the topic name is not specified or the topic name is specified more than one

[✖] the topic name is not specified or the topic name is specified more than one

//the topic name is not in the format of // or

[✖] Invalid short topic name '', it should be in the format of // or

//the topic name is not in the format of :////

[✖] Invalid complete topic name '', it should be in the format of :////

//the topic name is not in the format of //

[✖] Invalid topic name '', it should be in the format of//

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

Usage

$ set-max-unacked-messages-per-subscription

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. maxNum | m | 0 | Max unacked messages per subscription for a topic output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


set-message-ttl

Set Message TTL for a topic

pulsarctl topics set-message-ttl topic -t 10

Used For

Set Message TTL for a topic

Required Permission

This command requires tenant admin permissions.

Output

//normal output

Set message TTL successfully for [topic]

//the topic name is not specified or the topic name is specified more than one

[✖] the topic name is not specified or the topic name is specified more than one

//the topic name is not in the format of // or

[✖] Invalid short topic name '', it should be in the format of // or

//the topic name is not in the format of :////

[✖] Invalid complete topic name '', it should be in the format of :////

//the topic name is not in the format of //

[✖] Invalid topic name '', it should be in the format of//

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

Usage

$ set-message-ttl

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication ttl | t | 0 | Message TTL in seconds


set-persistence

Set persistence for a topic

pulsarctl topics set-persistence topic -e 4 -w 3 -a 2 -r 1.0

Used For

Set persistence for a topic

Required Permission

This command requires tenant admin permissions.

Output

//normal output

Set persistence successfully for [topic]

//the topic name is not specified or the topic name is specified more than one

[✖] the topic name is not specified or the topic name is specified more than one

//the topic name is not in the format of // or

[✖] Invalid short topic name '', it should be in the format of // or

//the topic name is not in the format of :////

[✖] Invalid complete topic name '', it should be in the format of :////

//the topic name is not in the format of //

[✖] Invalid topic name '', it should be in the format of//

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

Usage

$ set-persistence

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. bookkeeper-ack-quorum | a | 0 | Number of acks (guaranteed copies) to wait for each entry bookkeeper-ensemble | e | 0 | Number of bookies to use for a topic bookkeeper-write-quorum | w | 0 | How many writes to make of each entry ml-mark-delete-max-rate | r | 0 | Throttling rate of mark-delete operation (0 means no throttle) output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


set-publish-rate

Set message publish rate for a topic

pulsarctl topics set-publish-rate topic --msg-publish-rate 4 --byte-publish-rate 5 --publish-rate-period 6 --relative-to-publish-rate

Used For

Set message publish rate for a topic

Required Permission

This command requires tenant admin permissions.

Output

//normal output

Set message publish rate successfully for [topic]

//the topic name is not specified or the topic name is specified more than one

[✖] the topic name is not specified or the topic name is specified more than one

//the topic name is not in the format of // or

[✖] Invalid short topic name '', it should be in the format of // or

//the topic name is not in the format of :////

[✖] Invalid complete topic name '', it should be in the format of :////

//the topic name is not in the format of //

[✖] Invalid topic name '', it should be in the format of//

//topic-level policy is not enabled

[✖] code: 405 reason: Topic level policy is disabled, please enable broker configs of systemTopicEnabled and topicLevelPoliciesEnabled

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

Usage

$ set-publish-rate

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. byte-publish-rate | | -1 | byte-publish-rate (default -1 will be overwrite if not passed) msg-publish-rate | | -1 | message-publish-rate (default -1 will be overwrite if not passed) output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


set-retention

Set the retention policy for a topic

pulsarctl topics set-retention tenant/namespace/topic --time 100m --size 1G

Used For

Set the retention policy for a topic

Required Permission

This command requires tenant admin permissions.

Output

//normal output

Set the retention policy for [topic] successfully

//you must specify a tenant/namespace/topic name, please check if the tenant/namespace/topic name is provided

[✖] the topic name is not specified or the topic name is specified more than one

//the tenant does not exist

[✖] code: 404 reason: Tenant does not exist

//the namespace does not exist

[✖] code: 404 reason: Namespace (tenant/namespace) does not exist

//topic-level policy is not enabled

[✖] code: 405 reason: Topic level policy is disabled, please enable broker configs of systemTopicEnabled and topicLevelPoliciesEnabled

Usage

$ set-retention

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) size | | | Retention size limit (eg: 10M, 16G, 3T). 0 or less than 1MB means no retention and -1 means infinite size retention time | | | Retention time in minutes (or minutes, hours, days, weeks eg: 100m, 3h, 2d, 5w). 0 means no retention and -1 means infinite time retention tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


stats

Get the non-partitioned topic (topic-name) stats

pulsarctl topic stats (topic-name)

Get the partitioned topic (topic-name) stats

pulsarctl topic stats --partitioned-topic (topic-name)

Get the partitioned topic (topic-name) stats and per partition stats

pulsarctl topic stats --partitioned-topic --per-partition (topic-name)

Used For

This command is used for getting the stats for an existing topic and its connected producers and consumers. (All the rates are computed over a 1 minute window and are relative the last completed 1 minute period)

Required Permission

This command requires namespace admin permissions.

Output

//Get the non-partitioned topic stats

{

"msgRateIn": 0,

"msgRateOut": 0,

"msgThroughputIn": 0,

"msgThroughputOut": 0,

"averageMsgSize": 0,

"storageSize": 0,

"publishers": [],

"subscriptions": {},

"replication": {},

"deduplicationStatus": "Disabled"

}

//Get the partitioned topic stats

{

"msgRateIn": 0,

"msgRateOut": 0,

"msgThroughputIn": 0,

"msgThroughputOut": 0,

"averageMsgSize": 0,

"storageSize": 0,

"publishers": [],

"subscriptions": {},

"replication": {},

"deduplicationStatus": "",

"metadata": {

"partitions": 1

},

"partitions": {}

}

//Get the partitioned topic stats and per partition topic stats

{

"msgRateIn": 0,

"msgRateOut": 0,

"msgThroughputIn": 0,

"msgThroughputOut": 0,

"averageMsgSize": 0,

"storageSize": 0,

"publishers": [],

"subscriptions": {},

"replication": {},

"deduplicationStatus": "",

"metadata": {

"partitions": 1

},

"partitions": {

"": {

"msgRateIn": 0,

"msgRateOut": 0,

"msgThroughputIn": 0,

"msgThroughputOut": 0,

"averageMsgSize": 0,

"storageSize": 0,

"publishers": [],

"subscriptions": {},

"replication": {},

"deduplicationStatus": ""

}

}

}

//the topic name is not specified or the topic name is specified more than one

[✖] the topic name is not specified or the topic name is specified more than one

//the specified topic does not exist or the specified topic is a partitioned-topic and you don't specified --partitioned-topic or the specified topic is a non-partitioned topic and you specified --partitioned-topic

code: 404 reason: Topic not found

//the topic name is not in the format of // or

[✖] Invalid short topic name '', it should be in the format of // or

//the topic name is not in the format of :////

[✖] Invalid complete topic name '', it should be in the format of :////

//the topic name is not in the format of //

[✖] Invalid topic name '', it should be in the format of//

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

SCOPE:

non-partitioned topic, a partition of a partitioned topic, partitioned topic

Usage

$ stats

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) partitioned-topic | p | false | Get the partitioned topic stats per-partition | | false | Get the per partition topic stats tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


terminate

Terminate a non-partitioned topic (topic-name)

pulsarctl topic terminate (topic-name)

Terminate a partition of a partitioned topic

pulsarctl topic terminate --partition (partition) (topic-name)

Used For

This command is used for terminating a non-partitioned topic or a partition of a partitioned topic. Upon termination, no more messages are allowed to published to it.

Required Permission

This command requires tenant admin permissions.

Output

//normal output

Topic (topic-name) is successfully terminated at (message-id)

//the topic name is not specified or the topic name is specified more than one

[✖] the topic name is not specified or the topic name is specified more than one

//the specified topic does not exist

[✖] code: 404 reason: Topic not found

//the specified topic is a partitioned topic

[✖] code: 405 reason: Termination of a partitioned topic is not allowed

//the topic name is not in the format of // or

[✖] Invalid short topic name '', it should be in the format of // or

//the topic name is not in the format of :////

[✖] Invalid complete topic name '', it should be in the format of :////

//the topic name is not in the format of //

[✖] Invalid topic name '', it should be in the format of//

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

SCOPE:

non-partitioned topic, a partition of a partitioned topic

Usage

$ terminate

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) partition | p | -1 | The partitioned topic index value tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


unload

Unload a topic (topic-name)

pulsarctl topic unload (topic-name)

Used For

This command is used for unloading a topic.

Required Permission

This command requires super-user permissions.

Output

//normal output

Unload topic (topic-name) successfully

//the topic name is not specified or the topic name is specified more than one

[✖] the topic name is not specified or the topic name is specified more than one

//the specified topic does not exist

[✖] code: 404 reason: Topic not found

//the topic name is not in the format of // or

[✖] Invalid short topic name '', it should be in the format of // or

//the topic name is not in the format of :////

[✖] Invalid complete topic name '', it should be in the format of :////

//the topic name is not in the format of //

[✖] Invalid topic name '', it should be in the format of//

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

SCOPE:

non-partitioned topic, a partition of a partitioned topic

Usage

$ unload

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


update

pulsarctl topics update (topic-name) (partition-num)

Used For

This command is used for updating the partition number of an exist topic.

Required Permission

This command requires namespace admin permissions.

Output

//normal output

Update topic (topic-name) with (partition-num) partitions successfully

//the topic name and(or) the partitions is not specified

[✖] need to specified the topic name and the partitions

//the partitions number is invalid

[✖] invalid partition number ''

//the topic is not exist

[✖] code: 409 reason: Topic is not partitioned topic

//the topic name is not in the format of // or

[✖] Invalid short topic name '', it should be in the format of // or

//the topic name is not in the format of :////

[✖] Invalid complete topic name '', it should be in the format of :////

//the topic name is not in the format of //

[✖] Invalid topic name '', it should be in the format of//

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

SCOPE:

partitioned topic

Usage

$ update

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


brokers

Usage

$ brokers


delete-dynamic-config

Delete dynamic-serviceConfiguration of broker

pulsarctl brokers delete-dynamic-config --config (config name)

Used For

Delete dynamic-serviceConfiguration of broker

Required Permission

This command requires super-user permissions.

Output

//normal output

Deleted dynamic config: (config name) successful.

//Can't update non-dynamic configuration, please check --config arg.

[✖] code: 412 reason: Can't update non-dynamic configuration

Usage

$ delete-dynamic-config

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. config | | | service-configuration name output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


get-all-dynamic-config

Get all overridden dynamic-configuration values

pulsarctl brokers get-all-dynamic-config

Used For

Get all overridden dynamic-configuration values

Required Permission

This command requires super-user permissions.

Output

//normal output

{

"dispatchThrottlingRatePerTopicInMsg": "true"

}

Usage

$ get-all-dynamic-config

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


get-internal-config

Get internal configuration information

pulsarctl brokers get-internal-config

Used For

Get internal configuration information

Required Permission

This command requires super-user permissions.

Output

//normal output

{

"zookeeperServers": "127.0.0.1:2181",

"configurationStoreServers": "127.0.0.1:2181",

"ledgersRootPath": "/ledgers",

"stateStorageServiceUrl": "bk://127.0.0.1:4181"

}

Usage

$ get-internal-config

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


get-runtime-config

Get runtime configuration values

pulsarctl brokers get-runtime-config

Used For

Get runtime configuration values

Required Permission

This command requires super-user permissions.

Output

//normal output

{

“activeConsumerFailoverDelayTimeMillis”: “1000",

“advertisedAddress”: “127.0.0.1",

“allowAutoTopicCreation”: “true”,

“anonymousUserRole”: “”,

“authenticateOriginalAuthData”: “false”,

“authenticationEnabled”: “false”,

...

}

Usage

$ get-runtime-config

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


healthcheck

Run a health check against the broker

pulsarctl brokers healthcheck

Used For

Run a health check against the broker

Required Permission

This command requires super-user permissions.

Output

//normal output

ok

Usage

$ healthcheck

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


list

List active brokers of the cluster

pulsarctl brokers list (cluster-name)

Used For

List active brokers of the cluster

Required Permission

This command requires super-user permissions.

Output

//normal output

127.0.0.1:8080

//the cluster name is not specified or the cluster name is specified more than one

[✖] the cluster name is not specified or the cluster name is specified more than one

Usage

$ list

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


list-dynamic-config

Get all overridden dynamic-configuration values

pulsarctl brokers list-dynamic-config

Used For

Get all overridden dynamic-configuration values

Required Permission

This command requires super-user permissions.

Output

//normal output

dispatchThrottlingRatePerTopicInMsg

loadBalancerSheddingEnabled

brokerClientAuthenticationParameters

...

Usage

$ list-dynamic-config

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


namespaces

List namespaces owned by the broker

pulsarctl brokers namespaces (cluster-name) --url (eg:127.0.0.1:8080)

Used For

List namespaces owned by the broker

Required Permission

This command requires super-user permissions.

Output

//normal output

{

"public/functions/0x40000000_0x80000000": {

"broker_assignment": "shared",

"is_controlled": false,

"is_active": true

},

"pulsar/standalone/127.0.0.1:8080/0x00000000_0xffffffff": {

"broker_assignment": "shared",

"is_controlled": false,

"is_active": true

}

}

//the cluster name is not specified or the cluster name is specified more than one

[✖] the cluster name is not specified or the cluster name is specified more than one

//The correct url is not provided, please check the --url arg.

[✖] Get (broker url)/admin/v2/brokers/standalone/127.0.0.1:6650/ownedNamespaces: EOF

Usage

$ namespaces

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication url | | | broker-url


update-dynamic-config

Update dynamic-serviceConfiguration of broker

pulsarctl brokers update-dynamic-config --config (config name) --value (config value)

Used For

Update dynamic-serviceConfiguration of broker

Required Permission

This command requires super-user permissions.

Output

//normal output

Update dynamic config: (configName) successful.

//Can't update non-dynamic configuration, please check --config arg.

[✖] code: 412 reason: Can't update non-dynamic configuration

Usage

$ update-dynamic-config

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. config | | | service-configuration name output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication value | | | service-configuration value


broker-stats

Usage

$ broker-stats


allocator-stats

Dump the allocator stats

pulsarctl broker-stats allocator-stats

Used For

Dump the allocator stats

Required Permission

This command requires super-user permissions.

Output

//normal output

Print allocator stats info

//the namespace name is not specified or the namespace name is specified more than one

[✖] the namespace name is not specified or the namespace name is specified more than one

Usage

$ allocator-stats

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


load-report

Dump the broker load-report

pulsarctl broker-stats load-report

Used For

Dump the broker load-report

Required Permission

This command requires super-user permissions.

Output

//normal output

Print the broker load-report info

Usage

$ load-report

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


mbeans

Dump the mbean stats

pulsarctl broker-stats mbeans

Used For

Dump the mbean stats

Required Permission

This command requires super-user permissions.

Output

//normal output

Get all the mbean details of this broker JVM

Usage

$ mbeans

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


monitoring-metrics

Dumps the metrics for Monitoring

pulsarctl broker-stats monitoring-metrics

Used For

Dumps the metrics for Monitoring

Required Permission

This command requires super-user permissions.

Output

//normal output

Get all the metrics details for Monitoring

Usage

$ monitoring-metrics

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


topics

Dump the topics stats

pulsarctl broker-stats topics

Used For

Dump the topics stats

Required Permission

This command requires super-user permissions.

Output

//normal output

Get all stats details of broker.

Usage

$ topics

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


subscriptions

Usage

$ subscriptions


create

Create a subscription (subscription-name) on a topic (topic-name) from latest position

pulsarctl subscriptions create (topic-name) (subscription-name)

Create a subscription (subscription-name) on a topic (topic-name) from the specified position (position)

pulsarctl subscription create --messageId (position) (topic-name) (subscription-name)

Used For

This command is used for creating a subscription on a topic.

Required Permission

This command requires tenant admin and namespace produce or consume permissions.

Output

//normal output

Create subscription (subscription-name) on topic (topic-name) from (position) successfully

//the topic name and(or) the subscription name is not specified

[✖] need to specified the topic name and the subscription name

//the topic name is not in the format of // or

[✖] Invalid short topic name '', it should be in the format of // or

//the topic name is not in the format of :////

[✖] Invalid complete topic name '', it should be in the format of :////

//the topic name is not in the format of //

[✖] Invalid topic name '', it should be in the format of//

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special charsthe alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special charsthe alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

//the split of message id is not valid

[✖] Invalid message id string.

//the ledger id is not valid

[✖] Invalid ledger id string.

//the entry id is not valid

[✖] Invalid entry id string.

Usage

$ create

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. messageId | m | latest | message id where the subscription starts from. It can be either 'latest', 'earliest' or (ledgerId:entryId) output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


delete

Delete the subscription (subscription-name) of the topic (topic-name)

pulsarctl subscriptions delete (topic-name) (subscription-name)

Used For

This command is used for deleting a subscription of a topic.

Required Permission

This command requires tenant admin and namespace consume permissions.

Output

//normal output

Delete the subscription %s of the topic %s successfully

//the topic name and(or) the subscription name is not specified

[✖] need to specified the topic name and the subscription name

//the specified subscription does not exist

[✖] code: 404 reason: Subscription not found

//the specified topic does not exist

[✖] code: 404 reason: Topic not found

//the topic name is not in the format of // or

[✖] Invalid short topic name '', it should be in the format of // or

//the topic name is not in the format of :////

[✖] Invalid complete topic name '', it should be in the format of :////

//the topic name is not in the format of //

[✖] Invalid topic name '', it should be in the format of//

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special charsthe alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special charsthe alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

Usage

$ delete

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. force | f | false | Disconnect and close all consumers and delete subscription forcefully output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


expire

expire

Used For

This command is used for expiring messages that older than given expiry time (in seconds) for a subscription.

Required Permission

This command requires tenant admin and namespace produce or consume permissions.

Output

//normal output

Expire messages after (time)(s) for the subscription (subscription-name) of the topic (topic-name) successfully

//the topic name and(or) the subscription name is not specified

[✖] need to specified the topic name and the subscription name

//the specified topic does not exist

[✖] code: 404 reason: Topic not found

//the topic name is not in the format of // or

[✖] Invalid short topic name '', it should be in the format of // or

//the topic name is not in the format of :////

[✖] Invalid complete topic name '', it should be in the format of :////

//the topic name is not in the format of //

[✖] Invalid topic name '', it should be in the format of//

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special charsthe alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special charsthe alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

Usage

$ expire

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
all a false Expire all messages
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. expire-time | t | 0 | Expire messages older than time in seconds output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


get-message-by-id

Get message by the given legerID an entryID

pulsarctl subscription get-message-by-id --leger-id (leger-id) --entry-id (entry-id) (topic-name)

Used For

This command is used for getting messages by the given legerID and entryID for a subscription.

Required Permission

This command requires tenant admin and namespace produce or consume permissions.

Output

Usage

$ get-message-by-id

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. entry-id | e | 0 | entry id pointing to the desired entry leger-id | l | 0 | ledger id pointing to the desired ledger output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


list

List all the existing subscriptions of a topic (topic-name)

pulsarctl subscriptions list (topic-name)

Used For

This command is used for listing all the existing subscriptions of a topic.

Required Permission

This command requires tenant admin and namespace produce or consume permissions.

Output

//normal output

+----------------------+

| SUBSCRIPTIONS |

+----------------------+

+----------------------+

//the topic name is not specified or the topic name is specified more than one

[✖] the topic name is not specified or the topic name is specified more than one

//the topic name is not in the format of // or

[✖] Invalid short topic name '', it should be in the format of // or

//the topic name is not in the format of :////

[✖] Invalid complete topic name '', it should be in the format of :////

//the topic name is not in the format of //

[✖] Invalid topic name '', it should be in the format of//

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special charsthe alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special charsthe alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

Usage

$ list

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


peek

Peek some messages of a subscription

pulsarctl subscriptions peek --count (n) (topic-name) (subscription-name)

Used For

This command is used for peeking some messages of a subscription.

Required Permission

This command requires tenant admin permissions or namespace consumer permissions.

Output

//normal output

Message ID :

ledgerID:entryID:PartitionIndex:BatchIndex

Properties :

Message :

//the topic name and(or) the subscription name is not specified

[✖] need to specified the topic name and the subscription name

//the topic name is not in the format of // or

[✖] Invalid short topic name '', it should be in the format of // or

//the topic name is not in the format of :////

[✖] Invalid complete topic name '', it should be in the format of :////

//the topic name is not in the format of //

[✖] Invalid topic name '', it should be in the format of//

Usage

$ peek

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. count | n | 1 | Number of messages (default 1) output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


seek

Reset the position of the subscription (subscription-name) to a position that is closest to the provided timestamp (time)

pulsarctl seek --time (time) (topic-name) (subscription-name)

Reset the position of the subscription to a position that is closest to the provided message id (message-id)

pulsarctl seek --message-id (message-id) (topic-name) (subscription-name)

Used For

This command is used for resetting the position of a subscription to a position that is closest to the provided timestamp or messageId.

Required Permission

This command requires tenant admin and namespace produce or consume permissions.

Output

//normal output

Reset the cursor of the subscription (subscription-name) to (time)/(message-id) successfully

//the topic name and(or) the subscription name is not specified

[✖] need to specified the topic name and the subscription name

//the time is not specified or the message id is not specified

[✖] The reset position must be specified

//the specified topic does not exist

[✖] code: 404 reason: Topic not found

//the specified subscription does not exist

[✖] code: 404 reason: Subscription not found

//the topic name is not in the format of // or

[✖] Invalid short topic name '', it should be in the format of // or

//the topic name is not in the format of :////

[✖] Invalid complete topic name '', it should be in the format of :////

//the topic name is not in the format of //

[✖] Invalid topic name '', it should be in the format of//

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special charsthe alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special charsthe alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

Usage

$ seek

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. message-id | m | | message id to reset back to (e.g. ledgerId:entryId) output | o | text | The output format (text,json,yaml) time | t | | time to reset back to (e.g. 1s, 1m, 1h) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


skip

Skip (n) messages for the subscription (subscription-name) of the topic (topic-name)

pulsarctl subscription skip --count (n) (topic-name) (subscription-name)

Skip all messages for the subscription (subscription-name) under the topic (topic-name) (clear-backlog)

pulsarctl subscription skip --all (topic-name) (subscription-name)

Used For

This command is used for skipping messages for a subscription.

Required Permission

This command requires tenant admin and namespace produce or consume permissions.

Output

//normal output

The subscription (subscription-name) skips (n) messages of the topic successfully

//the topic name and(or) the subscription name is not specified

[✖] need to specified the topic name and the subscription name

//the specified topic does not exist

[✖] code: 404 reason: Topic not found

//the specified subscription does not exist

[✖] code: 404 reason: Subscription not found

//the topic name is not in the format of // or

[✖] Invalid short topic name '', it should be in the format of // or

//the topic name is not in the format of :////

[✖] Invalid complete topic name '', it should be in the format of :////

//the topic name is not in the format of //

[✖] Invalid topic name '', it should be in the format of//

//the namespace name is not in the format of /

[✖] The complete name of namespace is invalid. complete name :

//the tenant name and(or) namespace name is empty

[✖] Invalid tenant or namespace. [/]

//the tenant name contains unsupported special charsthe alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Tenant name include unsupported special chars. tenant : []

//the namespace name contains unsupported special charsthe alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed

[✖] Namespace name include unsupported special chars. namespace : []

Usage

$ skip

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
all a false skip all messages
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. count | n | -1 | number of messages to skip output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


resource-quotas

Usage

$ resource-quotas


get

Get the resource quota use default namespace/bundle

pulsarctl resource-quotas get

Get the resource quota for a specified namespace bundle

pulsarctl resource-quotas get (namespace name) (bundle range)

Used For

Get the resource quota for a specified namespace bundle, or default quota if no namespace/bundle is specified.

Required Permission

This command requires super-user permissions.

Output

//normal output

{

"msgRateIn" : 40.0,

"msgRateOut" : 120.0,

"bandwidthIn" : 100000.0,

"bandwidthOut" : 300000.0,

"memory" : 80.0,

"dynamic" : true

}

Usage

$ get

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


reset

Reset the specified namespace bundle's resource quota to default value

pulsarctl resource-quotas reset (namespace name) (bundle range)

Used For

Reset the specified namespace bundle's resource quota to default value.

Required Permission

This command requires super-user permissions.

Output

//normal output

Reset resource quota successful

Usage

$ reset

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


set

Set the resource quota use default namespace/bundle

pulsarctl resource-quotas set

Set the resource quota for specified namespace bundle

pulsarctl resource-quotas set --namespace (namespace name) --bundle (bundle range)--msgRateIn (msg rate in value)--msgRateOut (msg rate out)--bandwidthIn (bandwidth in)--bandwidthOut (bandwidth out)--memory (memory)--dynamic

Used For

Set the resource quota for specified namespace bundle, or default quota if no namespace/bundle specified.

Required Permission

This command requires super-user permissions.

Output

//normal output

Set (default) resource quota successful

Usage

$ set

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bandwidthIn | | 0 | expected inbound bandwidth (bytes/second) bandwidthOut | | 0 | expected outbound bandwidth (bytes/second) bookie-service-url | | | The bookie web service url that pulsarctl connects to. bundle | b | | {start-boundary}_{end-boundary}, must be specified together with '--namespace' dynamic | | false | dynamic (allow to be dynamically re-calculated) or not memory | | 0 | expected memory usage (Mbytes) msgRateIn | | 0 | expected incoming messages per second msgRateOut | | 0 | expected outgoing messages per second namespace | n | | cluster/namespace, must be specified together with '--bundle' output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


functions-worker

Usage

$ functions-worker


function-stats

Dump all functions stats running on this broker

pulsarctl functions-worker function-stats

Used For

Dump all functions stats running on this broker

Required Permission

This command requires super-user permissions.

Output

//normal output

[ ]

Usage

$ function-stats

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


get-cluster

Get all workers belonging to this cluster

pulsarctl functions-worker get-cluster

Used For

Get all workers belonging to this cluster

Required Permission

This command requires super-user permissions.

Output

//normal output

[

{

"workerId": "c-standalone-fw-127.0.0.1-8080",

"workerHostname": "127.0.0.1",

"port": 8080

}

]

Usage

$ get-cluster

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


get-cluster-leader

Get the leader of the worker cluster

pulsarctl functions-worker get-cluster-leader

Used For

Get the leader of the worker cluster

Required Permission

This command requires super-user permissions.

Output

//normal output

{

"workerId": "c-standalone-fw-127.0.0.1-8080",

"workerHostname": "127.0.0.1",

"port": 8080

}

Usage

$ get-cluster-leader

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


get-function-assignments

Get the assignments of the functions across the worker cluster

pulsarctl functions-worker get-function-assignments

Used For

Get the assignments of the functions across the worker cluster

Required Permission

This command requires super-user permissions.

Output

//normal output

[ ]

Usage

$ get-function-assignments

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


monitoring-metrics

Dump metrics for Monitoring

pulsarctl functions-worker monitoring-metrics

Used For

Dump metrics for Monitoring

Required Permission

This command requires super-user permissions.

Output

//normal output

[

{

"metrics": {

"fun_default_pool_allocated": 402653184,

"fun_default_pool_used": 4734976,

"jvm_direct_memory_used": 2550137118,

"jvm_gc_old_count": 0,

"jvm_gc_old_pause": 0,

"jvm_gc_young_count": 0,

"jvm_gc_young_pause": 0,

"jvm_heap_used": 305348512,

"jvm_max_direct_memory": 4294967296,

"jvm_max_memory": 2147483648,

"jvm_thread_cnt": 446,

"jvm_total_memory": 2147483648

},

"dimensions": {

"metric": "jvm_metrics"

}

}

]

Usage

$ monitoring-metrics

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


packages

Usage

$ packages


delete

Delete a package

pulsarctl packages delete
function://public/default/test@v1

Used For

Delete a package

Required Permission

This command requires super-user permissions.

Output

//normal output

The package 'function://public/default/test@v1' deleted successfully

Usage

$ delete

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


download

Download a package

pulsarctl packages download
function://public/default/test@v1
--path /pulsar/examples/test.jar

Used For

Download a package

Required Permission

This command requires super-user permissions.

Output

//normal output

The package 'function://public/default/test@v1' downloaded to path '/pulsar/examples/test.jar' successfully

Usage

$ download

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) path | | | download destination path of the package tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


get-metadata

Get the metadata of a package

pulsarctl packages get-metadata
function://public/default/test@v1

Used For

Get the metadata of a package

Required Permission

This command requires super-user permissions.

Output

//normal output

{

"description":"test",

"contact":"apache pulsar",

"createTime":1,

"modificationTime":1,

"properties":{

"foo":"bar"

}

}

Usage

$ get-metadata

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


list

List all the specified type packages under a namespace

pulsarctl packages list
--type function
public/default

Used For

List all specified type packages under a specific tenant and namespace

Required Permission

This command requires super-user permissions.

Output

//normal output

+--------------------+

| Package Name |

+--------------------+

| function://public/default/[email protected] |

+--------------------+

Usage

$ list

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication type | | | function, source, sink


list-versions

List all versions of a package

pulsarctl packages list-versions
function://public/default/example

Used For

List all versions of a package

Required Permission

This command requires super-user permissions.

Output

//normal output

+--------------------+

| Package Version |

+--------------------+

| function://public/default/[email protected] |

+--------------------+

Usage

$ list-versions

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


update-metadata

Update a package metadata information

pulsarctl packages update-metadata
function://public/default/test@v1
--description hello

Used For

Update a package metadata information

Required Permission

This command requires super-user permissions.

Output

//normal output

The metadata of the package 'function://public/default/test@v1' updated successfully

Usage

$ update-metadata

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. contact | | | contact info of a package description | | | descriptions of a package output | o | text | The output format (text,json,yaml) properties | P | [] | external information of a package tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


upload

Upload a package

pulsarctl packages upload
function://public/default/test@v1
--path /pulsar/examples/test.jar
--description test

Used For

Upload a package

Required Permission

This command requires super-user permissions.

Output

//normal output

The package 'function://public/default/test@v1' uploaded from path '/pulsar/examples/test.jar' successfully

Usage

$ upload

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. contact | | | contact info of a package description | | | descriptions of a package output | o | text | The output format (text,json,yaml) path | | | file path of the package properties | P | [] | external information of a package tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


ns-isolation-policy

Usage

$ ns-isolation-policy


broker

Get broker with namespace-isolation policies attached to it

pulsarctl ns-isolation-policy broker (cluster-name) (broker address)

Used For

Get broker with namespace-isolation policies attached to it.

Required Permission

This command requires super-user permissions.

Output

//normal output

{

"brokerName": "127.0.0.1:8080",

"policyName": "",

"isPrimary": false,

"namespaceRegex": null

}

//Reason: Cluster name does not exist, please check cluster name.

Reason: Cluster name does not exist.

//the cluster name is not specified or the cluster name is specified more than one, please check cluster name

the cluster name is not specified or the cluster name is specified more than one

Usage

$ broker

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


brokers

List all brokers with namespace-isolation policies attached to it

pulsarctl ns-isolation-policy brokers (cluster-name)

Used For

List all brokers with namespace-isolation policies attached to it.

Required Permission

This command requires super-user permissions.

Output

//normal output

[

{

"brokerName": "127.0.0.1:8080",

"policyName": "",

"isPrimary": false,

"namespaceRegex": null

}

]

//Reason: Cluster name does not exist, please check cluster name.

Reason: Cluster name does not exist.

//need to specified the cluster name and the policy name, please add cluster name and policy name

need to specified the cluster name and the policy name

//namespace-isolation policies not found for standalone

[✖] code: 404 reason: namespace-isolation policies not found for standalone

Usage

$ brokers

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


delete

Delete namespace isolation policy of a cluster.

pulsarctl ns-isolation-policy delete (cluster-name) (policy-name)

Used For

Delete namespace isolation policy of a cluster.

Required Permission

This command requires super-user permissions.

Output

//normal output

Delete namespaces isolation policy:(policy name) successful.

//NamespaceIsolationPolicies for cluster standalone does not exist, please check policy name.

NamespaceIsolationPolicies for cluster standalone does not exist

//Reason: Cluster name does not exist, please check cluster name.

Reason: Cluster name does not exist.

//need to specified the cluster name and the policy name, please add cluster name and policy name

need to specified the cluster name and the policy name

Usage

$ delete

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


get

Get namespace isolation policy of a cluster

pulsarctl ns-isolation-policy get (cluster-name) (policy-name)

Used For

Get namespace isolation policy of a cluster.

Required Permission

This command requires super-user permissions.

Output

//normal output

{

"namespaces" : [ "default" ],

"primary" : [ "aaa" ],

"secondary" : [ ],

"auto_failover_policy" : {

"policy_type" : "min_available",

"parameters" : {

"min_limit" : "3",

"usage_threshold" : "100"

}

}

}

//NamespaceIsolationPolicies for cluster standalone does not exist, please check policy name.

NamespaceIsolationPolicies for cluster standalone does not exist

//Reason: Cluster name does not exist, please check cluster name.

Reason: Cluster name does not exist.

//need to specified the cluster name and the policy name, please add cluster name and policy name

need to specified the cluster name and the policy name

Usage

$ get

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


list

List all namespace isolation policies of a cluster.

pulsarctl ns-isolation-policy list (cluster-name)

Used For

List all namespace isolation policies of a cluster.

Required Permission

This command requires super-user permissions.

Output

//normal output

{

"test-policiy-1" : {

"namespaces" : [ "default" ],

"primary" : [ "aaa" ],

"secondary" : [ ],

"auto_failover_policy" : {

"policy_type" : "min_available",

"parameters" : {

"min_limit" : "3",

"usage_threshold" : "100"

}

}

}

}

//Reason: Cluster name does not exist, please check cluster name.

Reason: Cluster name does not exist.

//the cluster name is not specified or the cluster name is specified more than one, please check cluster name

the cluster name is not specified or the cluster name is specified more than one

Usage

$ list

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


set

Create/Update a namespace isolation policy for a cluster

pulsarctl ns-isolation-policy set (cluster-name) (policy name) --auto-failover-policy-params min_limit=3,usage_threshold=100 --auto-failover-policy-type min_available --namespaces default --primary test-primary --secondary test-secondary

Used For

Create/Update a namespace isolation policy for a cluster.

Required Permission

This command requires super-user permissions.

Output

//normal output

Create/Update namespaces isolation policy: (policy name) successful.

//Reason: Cluster name does not exist, please check cluster name.

Reason: Cluster name does not exist.

//NamespaceIsolationPolicies for cluster standalone does not exist, please check policy name.

NamespaceIsolationPolicies for cluster standalone does not exist

//the cluster name is not specified or the cluster name is specified more than one, please check cluster name

the cluster name is not specified or the cluster name is specified more than one

Usage

$ set

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" auto-failover-policy-params | | | comma separated name=value auto failover policy parameters auto-failover-policy-type | | | Broker-name to get namespace-isolation policies attached to it bookie-service-url | | | The bookie web service url that pulsarctl connects to. namespaces | | [] | Broker-name to get namespace-isolation policies attached to it primary | | [] | Broker-name to get namespace-isolation policies attached to it secondary | | [] | Broker-name to get namespace-isolation policies attached to it tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


token

You can use this tool to generate secret key, private/public key, and token.

Usage

$ token


create

Create a token using a secret key string.

pulsarctl token create --secret-key-string (secret-key-string) --subject (subject)

Create a token using a secret key file.

pulsarctl token create --secret-key-file (secret-key-file-path) --subject (subject)

Create a token using a private key file.

pulsarctl token create --private-key-file (private-key-file-path) --subject (subject)

Create a token with expire time.

pulsarctl token create --secret-key-string (secret-key-string) --subject (subject) --expire 1m

Create a token using a base64 encoded secret key.

pulsarctl token create --secret-key-string (secret-key-string) --base64 --subject (subject)

Used For

This command is used for create a token string.

Required Permission

This command does not need any permission.

Output

//Create a token successfully.

eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJoZWxsby10ZXN0In0.qxaczygeZaZDlK7jQHHXCaQRbwd2wxIHjCH3y_Lo2Q4

//None of the signing keys is specified.

[✖] none of the signing keys is specified

//Signing key is specified more than one.

[✖] the signing key is specified more than one

Usage

$ create

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" base64 | | false | The secret key is base64 encoded or not. bookie-service-url | | | The bookie web service url that pulsarctl connects to. expire | | | The expire time for a token. e.g. 1s, 1m, 1h output | o | text | The output format (text,json,yaml) private-key-file | | | The private key file that used to sign a toke. secret-key-file | | | The secret key file that used to sign a token. secret-key-string | | | The secret key string that used to sign a token. signature-algorithm | a | RS256 | The signature algorithm used to generate the secret key or the private key Valid options are: 'HS256', 'HS384', 'HS512', 'RS256', 'RS384', 'RS512', 'PS256', 'PS384', 'PS512', 'ES256', 'ES384', 'ES512'. subject | | | The 'subject' or 'principal' associate with this token. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


create-key-pair

Create a private and public key pair using RS256 signature algorithm.

pulsarctl token create-key-pair --output-private-key (filepath) --output-public-key (filepath)

Create a private and public key pair using the specified signature algorithm.

pulsarctl toke create-key-pair --signature-algorithm (algorithm) --output-private-key (filepath) --output-public-key (filepath)

Used For

This command is used for creating a private and public key pair.

Required Permission

This command does not need any permission.

Output

//Create a key pair successfully.

The private key and public key are generated to (private-key-path) and (public-key-path) successfully.

//Writing a private key to a file was failed.

[✖] failed to write private key to the file (private-key-path)

//Writing a public key failed to a file was failed.

[✖] failed to write public key to the file (public-key-path)

//The specified output key file path is empty.

[✖] the private key file path and the public key file path can not be empty

Usage

$ create-key-pair

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) output-private-key | | private.key | The file that the private key is written to. output-public-key | | public.key | The file that the public key is written to. signature-algorithm | a | RS256 | The signature algorithm is used for generating the key pair. Valid options are: 'RS256', 'RS384', 'RS512', 'ES256', 'ES384', 'ES512'. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


create-secret-key

Create a secret key.

pulsarctl token create-secret-key

Create a base64 encoded secret key.

pulsarctl token create-secret-key --base64

Create a secret key and save it to a file.

pulsarctl token create-secret-key --output (file path)

Used For

This command is used for creating a secret key.

Required Permission

This command does not need any permission.

Output

//Create a secret key successfully.

[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]

//Write a base64 encoded secret key to the terminal.

AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=

//Write the secret key to a file successfully.

Write secret to the file (filename) successfully.

//Writing the secret key to a file was failed.

[✖] writing the secret key to the file (filename) was failed

//Using invalid signature algorithm to generate secret key.

[✖] the signature algorithm '(signature algorithm)' is invalid. Valid options are: 'HS256', 'HS384', 'HS512'

Usage

$ create-secret-key

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" base64 | b | false | Generate a base64 encoded secret key. bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) output-file | | | The file that the secret key is written to. signature-algorithm | a | HS256 | The signature algorithm used for generating the secret key. Valid options are:'HS256', 'HS384', 'HS512'. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


show

Read a token from the env TOKEN.

pulsarctl token show

Read a token from a given string.

pulsarctl token show --token-string (token)

Read a token from a given file.

pulsarctl token show --token-file (token)

Used For

This command is used for showing the content of a token.

Required Permission

This command does not need any permission.

Output

//Show the content of the given token.

The algorithm and subject of the token are (signature algorithm), (subject).

//There is no token to show.

[✖] both the token string and the token file are not specified

//Too many tokens to show.

[✖] both the token string and token file are specified

Usage

$ show

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | The token file you would like to show the content. token-string | | | The token string you would like to show the content.


validate

Validate a token string using the specified secret key string.

pulsarctl token validate --token-string (token) --secret-key-string (secret-key-string)

Validate a token file using the specified secret key file.

pulsarctl token validate --token-string (token) --secret-key-file (secret-key-file-path)

Validate a token string using the specified public key file.

pulsarctl token validate --token-string (token) --public-key-file (public-key-file-path)

Validate a token string using the specified base64 encoded secret key string.

pulsarctl token validate --token-string (token) --secret-key-string (secret-key-string) --base64

Validate a token file that signed with the specified secret key string and the specified signature algorithm.

pulsarctl toke validate --token-string (token) --secret-key-file (secret-key-file-path) --signature-algorithm (algorithm)

Used For

This command is used for validating a token.

Required Permission

This command does not need any permission.

Output

//The token is valid.

The subject is (subject), and the expire time is (time).

//Both the token string and the token file are not specified.

[✖] both the token string and the token file are not specified

//Both the token string and the token file are specified.

[✖] both the token string and token file are specified

//There is no key to validate the token.

[✖] none of the validate keys is specified

//The key used to validate token is specified more than one.

[✖] the validate key is specified more than one

Usage

$ validate

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" base64 | | false | The secret key is base64 encoded or not. bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) public-key-file | | | The public key file that used to validate a token. secret-key-file | | | The secret key file that used to validate a token. secret-key-string | | | The secret key string that used to validate a token. signature-algorithm | a | RS256 | The signature algorithm is used for generating the token. Valid options are: 'HS256', 'HS384', 'HS512', 'RS256', 'RS384', 'RS512', 'PS256', 'PS384', 'PS512', 'ES256', 'ES384', 'ES512'. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | The token file that will be validated. token-string | | | The token string that will be validated.


context

Usage

$ context


current

Provisions a new context

pulsarctl context current

Used For

Displays the current-context

Required Permission

This command does not need any permission

Output

//normal output

(current context name)

Usage

$ current

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


delete

Delete the context for the test cluster

pulsarctl context delete test

Used For

Delete the specified context from the pulsarconfig

Required Permission

This command does not need any permission

Output

//normal output

deleted context (context-name) from (pulsarconfig)

Usage

$ delete

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


get

List all the contexts in your pulsarconfig file

pulsarctl config get-contexts

Describe one context in your pulsarconfig file

pulsarctl context get

Used For

Describe one or many contexts

Required Permission

This command does not need any permission

Output

//normal output

+---------------+

| NAME |

+---------------+

| test-pulsar |

+---------------+

Usage

$ get

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


rename

Rename the context 'old-name' to 'new-name' in your pulsarconfig file

pulsarctl context rename old-name new-name

Used For

rename-context CONTEXT_NAME NEW_NAME

Required Permission

This command does not need any permission

Output

//normal output

Context old_name renamed to new_name

Usage

$ rename

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


set

Sets the user field on the gce context entry without touching other values

pulsarctl context set [options]

Use set of context to define your cluster

pulsarctl context set development --admin-service-url="http://{host}:8080" --bookie-service-url="http://{host}:8083"

Used For

Sets a context entry in pulsarconfig, Specifying a name that already exists will merge new fields on top of existing values for those fields.

Required Permission

This command does not need any permission

Output

//normal output

Set context successful

Usage

$ set

Flags

Name Shorthand Default Usage
admin-service-url s The admin web service url that pulsarctl connects to.
audience a The audience identifier for the Pulsar instance
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. client-id | c | | The OAuth 2.0 client identifier for pulsarctl issuer-endpoint | i | | The OAuth 2.0 issuer endpoint key-file | k | | The path to the private key file scope | | | The OAuth 2.0 scope(s) to request tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


use

Use the context for the test cluster

pulsarctl context use test

Used For

use-context CONTEXT_NAME

Required Permission

This command does not need any permission

Output

//normal output

Switched to context (context name)

Usage

$ use

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


bookkeeper

Usage

$ bookkeeper


auto-recovery

Usage

$ auto-recovery


auto-recovery decommission

Decommission a bookie.

pulsarctl bookkeeper auto-recovery decommission (bk-ip:bk-port)

Used For

This command is used for decommissioning a bookie.

Required Permission

This command does not need any permission.

Output

//Successfully decommission a bookie.

Successfully decommission the bookie (bookie-ip:bookie-port)

//The bookie address is not specified or the bookie address is specified more than one.

[✖] the bookie address is not specified or the bookie address is specified more than one

Usage

$ decommission

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


auto-recovery get-lost-bookie-recovery-delay

Get the lost Bookie Recovery Delay of a bookie.

pulsarctl bookkeeper auto-recovery get-lost-bookie-recovery-delay

Used For

This command is used for getting the lost bookie recovery delay in second of a bookie.

Required Permission

This command does not need any permission.

Output

//Get the lost bookie recovery delay of a bookie.

lostBookieRecoveryDelay value: (delay)

Usage

$ get-lost-bookie-recovery-delay

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


auto-recovery list-under-replicated-ledger

Get all the under-replicated ledgers which have been marked for re-replication.

pulsarctl bookkeeper auto-recovery list-under-replicated-ledger

Get all the under-replicated ledgers of a bookie which have been marked for re-replication.

pulsarctl bookkeeper auto-recovery list-under-replicated-ledger --include (bookie-ip:bookie-port)

Get all the under-replicated ledgers except a bookie which have been marked for re-replication.

pulsarctl bookkeeper auto-recovery list-under-replicated-ledger --exclude (bookie-ip:bookie-port)

Used For

This command is used for getting all the under-replicated ledgers which have been marked for re-replication.

Required Permission

This command does not need any permission.

Output

//Get the under-replicated ledgers successfully.

{

[ledgerId1, ledgerId2...]

}

Usage

$ list-under-replicated-ledger

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. exclude | | | Show the under-replicated ledger exclude the bookie. include | | | Show the under-replicated ledger of the bookie. output | o | text | The output format (text,json,yaml) show | | false | Show the replicate ledger list. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


auto-recovery recover-bookie

Recover the ledger data of a failed bookie.

pulsarctl bookkeeper auto-recovery recover-bookie (bookie-1) (bookie-2)

Used For

This command is used for recovering the ledger data of a failed bookie.

Required Permission

This command does not need any permission.

Output

//Recover the bookies successfully.

Successfully recover the bookies (bookie-1) (bookie-2).

//The recover bookie id is not specified.

[✖] you need to specify the recover bookies id

Usage

$ recover-bookie

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. delete-cookie | | false | Delete cookie when recovering the failed bookies. output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


auto-recovery set-lost-bookie-recovery-delay

Set the lost bookie recovery delay.

pulsarctl bookkeeper auto-recovery set-lost-bookie-recovery-delay (delay)

Used For

This command is used for setting the lost bookie recovery delay in second.

Required Permission

This command does not need any permission.

Output

//Set the lost bookie recovery delay to the new delay successfully.

Successfully set the lost bookie recovery delay to (delay)(second)

//The specified delay time is not specified or the delay time is specified more than one.

[✖] the specified delay time is not specified or the delay time is specified more than one

Usage

$ set-lost-bookie-recovery-delay

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


auto-recovery trigger-audit

Trigger audit by resetting the lost bookie recovery delay

pulsarctl bookkeeper auto-recovery trigger-audit

Used For

This command is used for triggering audit by resetting the lost bookie recovery delay.

Required Permission

This command does not need any permission.

Output

//Trigger audit by resetting the lost bookie recovery delay successfully.

Successfully trigger audit by resetting the lost bookie recovery delay.

Usage

$ trigger-audit

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


auto-recovery who-is-auditor

Get who is the auditor

pulsarctl bookkeeper auto-recovery who-is-auditor

Used For

This command is used for getting who is the auditor.

Required Permission

This command does not need any permission.

Output

//Get the auditor successfully.

{

"Auditor": "hostname/hostAddress:Port"

}

Usage

$ who-is-auditor

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


bookie

Usage

$ bookie


bookie expand-storage

Expanding storage for a bookie.

pulsarctl bookkeeper bookie expand-storage

Used For

This command is used for expanding storage for a bookie.

Required Permission

This command does not need any permission.

Output

//Expand the storage successfully.

Successfully expand the storage

Usage

$ expand-storage

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


bookie gc

Trigger garbage collection for a bookie.

pulsarctl bookkeeper bookie gc

Used For

This command is used for triggering garbage collection for a bookie.

Required Permission

This command does not need any permission.

Output

//Successfully trigger garbage collection.

Successfully trigger garbage collection.

Usage

$ gc

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


bookie gc-details

Get the garbage collection details of a bookie.

pulsarctl bookkeeper bookie gc-details

Used For

This command is used for getting the garbage collection details of a bookie.

Required Permission

This command does not need any permission.

Output

//Successfully get the garbage collection details of a bookie.

[

{

"forceCompacting": false,

"majorCompacting": false,

"minorCompacting": false,

"lastMajorCompactionTime": 1,

"lastMinorCompactionTime": 1,

"majorCompactionCounter": 1,

"minorCompactionCounter": 1

}

]

Usage

$ gc-details

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


bookie gc-status

Get the garbage collection status of a bookie.

pulsarctl bookkeeper bookie gc-status

Used For

This command is used for getting the garbage collection status of a bookie.

Required Permission

This command does not need any permission.

Output

//Successfully get the garbage collection status of a bookie.

{

"is_in_force_gc" : "false"

}

Usage

$ gc-status

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


bookie last-log-marker

Get the last log marker of the journals on a bookie.

pulsarctl bookkeeper bookie last-log-marker

Used For

This command is used for getting the last log marker of the journals on a bookie.

Required Permission

This command does not need any permission.

Output

//Successfully get the last log marker of the journals on a bookie.

{

JournalId1 : position1,

JournalId2 : position2,

...

}

Usage

$ last-log-marker

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


bookie list-disk-file

Get all the specified fileType (e.g. journal, entrylog, index) files on the disk of a bookie.

pulsarctl bookkeeper bookie list-disk-file (file-type)

Used For

This command is used for getting all the files on the disk of a bookie.

Required Permission

This command does not need any permission.

Output

//Successfully get the files on the disk of a bookie.

{

"journal files" : "filename1 filename2 ...",

"entrylog files" : "filename1 filename2...",

"index files" : "filename1 filename2 ..."

}

//The file type is not specified or the file type is specified more than one.

[✖] the file type is not specified or the file type is specified more than one

//The specified file type is invalid.

[✖] invalid file type %s, the file type only can be specified as 'journal', 'entrylog', 'index'

Usage

$ list-disk-file

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


bookie state

Get the state of the bookie.

pulsarctl bookkeeper bookie state

Used For

This command is used for getting the state of a bookie.

Required Permission

This command does not need any permission.

Output

//Successfully get the state of a bookie.

{

"running": true,

"readOnly": true,

"shuttingDown": false,

"availableForHighPriorityWrites": false

}

Usage

$ state

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


ledger

Usage

$ ledger


ledger delete

Delete the specified ledger

pulsarctl bookkeeper ledger delete (ledger-id)

Used For

This command is used for deleting a ledger.

Required Permission

none

Output

//normal output

Successfully delete the ledger (ledger-id)

//the ledger id is not specified or the ledger id is specified more than one

[✖] the ledger id is not specified or the ledger id is specified more than one

Usage

$ delete

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


ledger get

Get the metadata of the specified ledger

pulsarctl bookkeeper ledger get (ledger-i)

Used For

This command is used for getting the metadata of a ledger.

Required Permission

none

Output

//normal output

{

"storeCtime": false,

"hasPassword": false,

"metadataFormatVersion": 1,

"ensembleSize": 1,

"writeQuorumSize": 1,

"ackQuorumSize": 1,

"length": 1,

"lastEntryId": 1,

"ctime": 1,

"cToken": 0,

"state": "CLOSED",

"digestType": "MAC",

"allEnsembles": {

"1": [

{

"port": 8080,

"hostname": "www.examples.com"

}

]

},

"currentEnsemble": [

{

"port": 8080,

"hostname": "www.example.com"

}

],

"password": "",

"customMetadata": {}

}

//the ledger id is not specified or the ledger id is specified more than one

[✖] the ledger id is not specified or the ledger id is specified more than one

Usage

$ get

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


ledger list

List all the ledgers

pulsarctl bookkeeper ledger list

List all the ledgers and the metadata of the ledger

pulsarctl bookkeeper ledger list --show-metadata

Used For

This command is used for listing all the ledgers.

Required Permission

none

Output

//normal output

[1,2,3,4]

Usage

$ list

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) show-metadata | p | false | Show the metadata of the ledgers tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


ledger read

Read a range of entries of the specified ledger

pulsar bookkeeper ledger read (ledger-id)

Read the entries of the specified ledger started from the given entry id

pulsar bookkeeper ledger --start (entry-id) (ledger-id)

Read the specified range of entries of the specified ledger

pulsar bookkeeper ledger --start (entry-id) --end (entry-id) (ledger-id)

Used For

This command is used for reading a range of entries of a ledger.

Required Permission

none

Output

//normal output

{

"ledger-id", "message"

}

//the ledger id is not specified or the ledger id is specified more than one

[✖] the ledger id is not specified or the ledger id is specified more than one

Usage

$ read

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. end | e | -1 |
output | o | text | The output format (text,json,yaml) start | b | -1 |
tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


plugin

Usage

$ plugin


list

List all the plugins.

pulsarctl plugin list

Used For

This command is used for listing all plugins.

Required Permission

This command does not need any permission.

Output

//List all the plugins successfully.

Usage

$ list

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
auth-params Authentication parameters are used to configure the authentication provider specified by "AuthPlugin".

Tls example: "tlsCertFile:val1,tlsKeyFile:val2" Token example: "authParams=file:///path/to/token/file" or "authParams=token:tokenVal" auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. output | o | text | The output format (text,json,yaml) tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


oauth2

Login as a user or activate a service account using OAuth 2.0 authentication

Usage

$ oauth2


activate

Activate a service account by supplying its credentials.

pulsarctl oauth2 activate --key-file (key file path)

Used For

This command is used for activating a service account by supplying its credentials.

Required Permission

This command doesn't need pulsar permissions.

Output

Usage

$ activate

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
audience a The audience identifier for the Pulsar instance
auth-params Authentication parameters are used to configure the OAuth 2.0 provider.

OAuth2 example: "{"audience":"test","issuerUrl":"https://sample","privateKey":"/mnt/secrets/auth.json","scope":"api://default/"}"

auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. issuer-endpoint | i | | The OAuth 2.0 issuer endpoint key-file | k | | The path to the private key file output | o | text | The output format (text,json,yaml) scope | | | The OAuth 2.0 scope(s) to request tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication


login

Login as a oauth2 user

pulsarctl oauth2 login

Used For

This command is used for oauth2 user login.

Required Permission

This command doesn't need pulsar permissions.

Output

Usage

$ login

Flags

Name Shorthand Default Usage
admin-service-url s http://localhost:8080 The admin web service url that pulsarctl connects to.
audience a The audience identifier for the Pulsar instance
auth-params Authentication parameters are used to configure the OAuth 2.0 provider.

OAuth2 example: "{"audience":"test","issuerUrl":"https://sample","privateKey":"/mnt/secrets/auth.json","scope":"api://default/"}"

auth-plugin | | | AuthPlugin is used to specify the plugin to use for authentication, the supported values are "org.apache.pulsar.client.impl.auth.AuthenticationTls" and "org.apache.pulsar.client.impl.auth.AuthenticationToken" bookie-service-url | | | The bookie web service url that pulsarctl connects to. client-id | c | | The OAuth 2.0 client identifier for pulsarctl issuer-endpoint | i | | The OAuth 2.0 issuer endpoint output | o | text | The output format (text,json,yaml) scope | | | The OAuth 2.0 scope(s) to request tls-allow-insecure | | false | Allow TLS insecure connection tls-cert-file | | | File path for TLS cert used for authentication tls-enable-hostname-verification | | false | Enable TLS hostname verification tls-key-file | | | File path for TLS key used for authentication tls-trust-cert-path | | | Allow TLS trust cert file path token | | | Using the token to authentication token-file | | | Using the token file to authentication