This section contains the most basic commands for getting a workload running on your cluster.
Create a cluster using the data in cluster.json.
snctl create -f ./cluster.json
Create a cluster based on the JSON passed to stdin.
cat cluster.json | snctl create -f -
Edit the data in cluster.yaml in JSON and then create the resource using the edited data.
snctl create -f cluster.yaml --edit -o json
Create a resource from a file or from stdin.
JSON and YAML formats are accepted.
$ create -f FILENAME
Name | Shorthand | Default | Usage |
---|---|---|---|
allow-missing-template-keys | true | If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats. | |
dry-run | false | If true, only print the object that would be sent, without sending it. | |
edit | false | Edit the API resource before creating. | |
field-manager | snctl-create | Name of the manager used to track field ownership. | |
filename | f | [] | Filename, directory, or URL to files to use to create the resource |
kustomize | k | Process the kustomization directory. This flag can't be used together with -f or -R. | |
output | o | Output format. One of: (json, yaml, name, go-template, go-template-file, template, templatefile, jsonpath, jsonpath-as-json, jsonpath-file). | |
raw | Raw URI to POST to the server. Use the transport specified by the config file. | ||
recursive | R | false | Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory. |
save-config | false | If true, the configuration of current object will be saved in its annotation. Otherwise, the annotation will be unchanged. This flag is useful when you want to perform kubectl apply on this object in the future. | |
selector | l | Selector (label query) to filter on, supporting '=', '==', and '!='.(e.g. -l key1=value1,key2=value2). | |
show-managed-fields | false | If true, keep the managedFields when printing objects in JSON or YAML format. | |
template | Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview]. | ||
validate | strict | Must be one of: strict (or true), warn, ignore (or false).| "true" or "strict" will use a schema to validate the input and fail the request if invalid. It will perform server side validation if ServerSideFieldValidation is enabled on the api-server, but will fall back to less reliable client-side validation if not.| "warn" will warn about unknown or duplicate fields without blocking the request if server-side field validation is enabled on the API server, and behave as "ignore" otherwise.| "false" or "ignore" will not perform any schema validation, silently dropping any unknown or duplicate fields. | |
windows-line-endings | false | Only relevant if --edit=true. Defaults to the line ending native to your platform. |
Create an APIKey
snctl create apikey APIKEY_NAME --instance-name INSTANCE_NAME --service-account-name SERVICE_ACCOUNT_NAME --expiration-time EXPIRE_TIME --description DESCRIPTION
Create a APIKey.
$ apikey [NAME]
Name | Shorthand | Default | Usage |
---|---|---|---|
allow-missing-template-keys | true | If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats. | |
description | The description of APIKey | ||
dry-run | false | If true, only print the object that would be sent, without sending it. | |
expiration-time | The expiration time of an APIKey, the value is time in days to expire to with --expiration-time (or minutes, hours, days eg: 10m, 3h, 2d)or a time string value with format like '2006-01-02T15:04:05Z'or 0 means never expire. | ||
field-manager | snctl-create | Name of the manager used to track field ownership. | |
instance-name | The instance name of APIKey | ||
output | o | Output format. One of: (json, yaml, name, go-template, go-template-file, template, templatefile, jsonpath, jsonpath-as-json, jsonpath-file). | |
service-account-name | The service account name of APIKey | ||
show-managed-fields | false | If true, keep the managedFields when printing objects in JSON or YAML format. | |
template | Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview]. |
Create an aws Cloud Connection
snctl create cloudconnection CLOUD_CONNECTION_NAME --type aws --account-id ACCOUNT_ID
Create a Cloud Connection.
$ cloudconnection [NAME]
Name | Shorthand | Default | Usage |
---|---|---|---|
account-id | The account id of aws cloud connection. | ||
allow-missing-template-keys | true | If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats. | |
client-id | The client id of azure cloud connection | ||
dry-run | false | If true, only print the object that would be sent, without sending it. | |
field-manager | snctl-create | Name of the manager used to track field ownership. | |
output | o | Output format. One of: (json, yaml, name, go-template, go-template-file, template, templatefile, jsonpath, jsonpath-as-json, jsonpath-file). | |
project-id | The project id of gcp cloud connection | ||
show-managed-fields | false | If true, keep the managedFields when printing objects in JSON or YAML format. | |
subscription-id | The subscription id of azure cloud connection | ||
support-client-id | The support client id of azure cloud connection | ||
template | Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview]. | ||
tenant-id | The tenant id of azure cloud connection | ||
type | The type of cloud connection type, allowed: aws, gcp or azure. |
Create an Cloud Environment
snctl create cloudenvironment --cloud-connection-name CLOUD_CONNECTION_NAME \
--region REGION \
--network-cidr 10.10.0.0/16
Create an Azure Cloud Environment
snctl create cloudenvironment --cloud-connection-name CLOUD_CONNECTION_NAME \
--region RESOURCE_GROUP_NAME \
--network-cidr 10.10.0.0/16
Create an zonal Cloud Environment
snctl create cloudenvironment --cloud-connection-name CLOUD_CONNECTION_NAME \
--region REGION \
--zone ZONE \
--network-cidr 10.10.0.0/16
Create BYOC Pro Cloud Environment with customer-managed dns
snctl create cloudenvironment --cloud-connection-name CLOUD_CONNECTION_NAME \
--region REGION \
--network-cidr 10.10.0.0/16 \
--dns-id DNS_ID \
--dns-name DNS_NAME
Create an Cloud Environment with public gateway
snctl create cloudenvironment --cloud-connection-name CLOUD_CONNECTION_NAME \
--region REGION \
--default-gateway-access public \
--network-cidr 10.10.0.0/16
Create an Cloud Environment with private gateway
snctl create cloudenvironment --cloud-connection-name CLOUD_CONNECTION_NAME \
--region REGION \
--default-gateway-access private \
--default-gateway-allowed-ids WHITE_LIST_ID1 \
--default-gateway-allowed-ids WHITE_LIST_ID2 \
--network-cidr 10.10.0.0/16
Create a Cloud Environment.
$ cloudenvironment [NAME]
Name | Shorthand | Default | Usage |
---|---|---|---|
allow-missing-template-keys | true | If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats. | |
cloud-connection-name | The name of cloud connection name. | ||
default-gateway-access | public | The access type of the default gateway, this will determine accessibility of Pulsar endpoint. It can be one of public, private, the default is public. | |
default-gateway-allowed-ids | [] | The allowed ids of the default gateway, only can be set when default gateway access is private. | |
dns-id | The DNS ID of Cloud Environment | ||
dns-name | The DNS name of Cloud Environment | ||
dry-run | false | If true, only print the object that would be sent, without sending it. | |
environment-type | The environment type of Cloud Environment, it can be one of dev, test, staging, production, poc, qa, acc, the default is production | ||
field-manager | snctl-create | Name of the manager used to track field ownership. | |
network-cidr | The network cidr of Cloud Environment | ||
network-id | The network id of Cloud Environment | ||
output | o | Output format. One of: (json, yaml, name, go-template, go-template-file, template, templatefile, jsonpath, jsonpath-as-json, jsonpath-file). | |
region | The region of Cloud Environment. The resource group name should be provided if the cloud connection type is Azure. | ||
show-managed-fields | false | If true, keep the managedFields when printing objects in JSON or YAML format. | |
subnet-cidr | The subnet cidr of Cloud Environment | ||
template | Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview]. | ||
zone | The zone of Cloud Environment, this underlying Pool Member will be zonal if this is configured. |
Create a IdentityPool for cloud
snctl create identitypool POOL_NAME --auth-type AUTH_TYPE --provider-name PROVIDER_NAME --expression Expression --description POOL_DESCRIPTION
Create a identitypool for cloud.
$ identitypool [NAME]
Name | Shorthand | Default | Usage |
---|---|---|---|
allow-missing-template-keys | true | If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats. | |
auth-type | token | the auth type for the identity pool | |
description | the identity pool description | ||
dry-run | false | If true, only print the object that would be sent, without sending it. | |
expression | the filter expression for the identity pool | ||
field-manager | snctl-create | Name of the manager used to track field ownership. | |
output | o | Output format. One of: (json, yaml, name, go-template, go-template-file, template, templatefile, jsonpath, jsonpath-as-json, jsonpath-file). | |
provider-name | the provider name | ||
show-managed-fields | false | If true, keep the managedFields when printing objects in JSON or YAML format. | |
template | Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview]. |
Create a OIDCProvider for cloud
snctl create oidcprovider PROVIDER_NAME --discovery_url DISCOVERY_URL --description PROVIDER_DESCRIPTION
Create a oidcprovider for cloud.
$ oidcprovider [NAME]
Name | Shorthand | Default | Usage |
---|---|---|---|
allow-missing-template-keys | true | If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats. | |
description | the oidcprovider description | ||
discovery-url | the discovery url of the oidc provider | ||
dry-run | false | If true, only print the object that would be sent, without sending it. | |
field-manager | snctl-create | Name of the manager used to track field ownership. | |
output | o | Output format. One of: (json, yaml, name, go-template, go-template-file, template, templatefile, jsonpath, jsonpath-as-json, jsonpath-file). | |
show-managed-fields | false | If true, keep the managedFields when printing objects in JSON or YAML format. | |
template | Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview]. |
Create a Pulsar cluster in a Pulsar instance with the specified node type and location.
snctl create pulsarcluster PULSAR_CLUSTER_NAME --instance-name INSTANCE-NAME --node-type NODE_TYPE --location LOCATION
snctl create pulsarcluster PULSAR_CLUSTER_NAME --instance-name INSTANCE-NAME --node-type NODE_TYPE --pool-member-name POOL_MEMBER_NAME
Create a Pulsar cluster with multiple Pulsar gateways.
snctl create pulsarcluster PULSAR_CLUSTER_NAME --instance-name INSTANCE-NAME \
--node-type NODE_TYPE --pool-member-name POOL_MEMBER_NAME \
--gateways GATEWAY1 --gateways GATEWAY2
Create a Pulsar cluster.
$ pulsarcluster [NAME]
Name | Shorthand | Default | Usage |
---|---|---|---|
allow-missing-template-keys | true | If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats. | |
bookie-replicas | 3 | the replicas of the bookkeeper | |
broker-replicas | 2 | the replicas of the broker | |
compute-unit | 0.5 | compute unit, 1 compute unit is 2 cpu and 8gb memory | |
display-name | the display name of the pulsar cluster | ||
dry-run | false | If true, only print the object that would be sent, without sending it. | |
field-manager | snctl-create | Name of the manager used to track field ownership. | |
gateways | [] | the pulsar gateways used to expose the pulsar cluster endpoint | |
instance-name | The name of the pulsar instance. | ||
location | The location to deploy the cluster. | ||
node-type | the node type deprecated please use compute-unit and storage-unit | ||
output | o | Output format. One of: (json, yaml, name, go-template, go-template-file, template, templatefile, jsonpath, jsonpath-as-json, jsonpath-file). | |
pool-member-name | The name of the pool member, only can be specified by BYOC users. | ||
release-channel | rapid | the release channel to subscribe to, it can be one of lts or rapid, default rapid | |
show-managed-fields | false | If true, keep the managedFields when printing objects in JSON or YAML format. | |
storage-unit | 0.5 | storage unit, 1 storage unit is 2 cpu and 8gb memory | |
template | Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview]. | ||
volume | the volume to use for the pulsar cluster |
Create a Pulsar gateway with public access
snctl create pulsargateway NAME --access public --pool-member-name POOL_MEMBER_NAME
Create a Pulsar gateway with private access on AWS Pool member
snctl create pulsargateway NAME --access private \
--allowed-ids arn:aws:iam::1234567890:root \
--pool-member-name POOL_MEMBER_NAME
Create a Pulsar gateway with private access on GCP Pool member
snctl create pulsargateway NAME --access private \
--allowed-ids PROJECT_NAME \
--pool-member-name POOL_MEMBER_NAME
Create a Pulsar gateway with private access on Azure Pool member
snctl create pulsargateway NAME --access private \
--allowed-ids SUBSCRIPTION_ID \
--pool-member-name POOL_MEMBER_NAME
Create a Pulsar gateway to expose Pulsar service as public or private endpoint.
$ pulsargateway [NAME]
Name | Shorthand | Default | Usage |
---|---|---|---|
access | public | Access type | |
allow-missing-template-keys | true | If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats. | |
allowed-ids | [] | Ids allowed to consume the private service, only can be set when access is private | |
dry-run | false | If true, only print the object that would be sent, without sending it. | |
field-manager | snctl-create | Name of the manager used to track field ownership. | |
output | o | Output format. One of: (json, yaml, name, go-template, go-template-file, template, templatefile, jsonpath, jsonpath-as-json, jsonpath-file). | |
pool-member-name | Pool member name | ||
show-managed-fields | false | If true, keep the managedFields when printing objects in JSON or YAML format. | |
template | Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview]. |
Create a standard zonal Pulsar instance.
snctl create pulsarinstance PULSAR_INSTANCE_NAME
Create a standard regional Pulsar instance.
snctl create pulsarinstance PULSAR_INSTANCE_NAME --availability-mode regional
Create a Pulsar instance on a named infrastructure pool.
snctl create pulsarinstance PULSAR_INSTANCE_NAME --pool streamnative/shared-aws
Create a serverless Pulsar instance.
snctl create pulsarinstance PULSAR_INSTANCE_NAME --pool streamnative/shared-aws --type serverless
Create a Pulsar instance with the specific name.
$ pulsarinstance [NAME]
Name | Shorthand | Default | Usage |
---|---|---|---|
allow-missing-template-keys | true | If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats. | |
availability-mode | zonal | The availability mode, supporting 'zonal' and 'regional'. | |
dry-run | false | If true, only print the object that would be sent, without sending it. | |
engine | The engine of the Pulsar instance, supported engine type 'ursa' 'classic'. | ||
field-manager | snctl-create | Name of the manager used to track field ownership. | |
output | o | Output format. One of: (json, yaml, name, go-template, go-template-file, template, templatefile, jsonpath, jsonpath-as-json, jsonpath-file). | |
pool | The infrastructure pool to use. By default, a pool is selected automatically. | ||
show-managed-fields | false | If true, keep the managedFields when printing objects in JSON or YAML format. | |
template | Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview]. | ||
type | The type of the Pulsar instance. By default, it is 'serverless', supported type 'serverless' 'dedicated', 'byoc' and 'byoc-pro'. |
Create a role for cloud
snctl create role ROLE_NAME --permissions PERMISSIONS
Create a role for cloud.
$ role [NAME]
Name | Shorthand | Default | Usage |
---|---|---|---|
allow-missing-template-keys | true | If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats. | |
dry-run | false | If true, only print the object that would be sent, without sending it. | |
field-manager | snctl-create | Name of the manager used to track field ownership. | |
output | o | Output format. One of: (json, yaml, name, go-template, go-template-file, template, templatefile, jsonpath, jsonpath-as-json, jsonpath-file). | |
permissions | [] | Permissions | |
show-managed-fields | false | If true, keep the managedFields when printing objects in JSON or YAML format. | |
template | Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview]. |
Create a role binding for a service account
snctl create rolebinding ROLE_BINDING_NAME --role ROLE_NAME --serviceaccount SERVICE_ACCOUNT_NAME
Create a role binding for a user or service account.
$ rolebinding [NAME]
Name | Shorthand | Default | Usage |
---|---|---|---|
role | The role bound to the user or service account. | ||
clusterrole | The predefined cluster role bound to the user or service account. | ||
user | [] | User(s) to which the role is bound. | |
identitypool | [] | IdentityPool(s) to which the role is bound. | |
serviceaccount | [] | service account(s) to which the role is bound. | |
condition-cel | the CEL(common expression language) format condition | ||
condition-organization | [] | Common StreamNative Resource Names(SRN) organization(s) condition | |
condition-instance | [] | Common StreamNative Resource Names(SRN) instance(s) condition | |
condition-cluster | [] | Common StreamNative Resource Names(SRN) cluster(s) condition | |
condition-tenant | [] | Common StreamNative Resource Names(SRN) tenant(s) condition | |
condition-namespace | [] | Common StreamNative Resource Names(SRN) namespace(s) condition | |
condition-topic-domain | [] | Common StreamNative Resource Names(SRN) topic domain(s) condition | |
condition-topic-name | [] | Common StreamNative Resource Names(SRN) topic name(s) condition | |
condition-subscription | [] | Common StreamNative Resource Names(SRN) subscription(s) condition | |
show-managed-fields | false | If true, keep the managedFields when printing objects in JSON or YAML format. | |
template | Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview]. | ||
allow-missing-template-keys | true | If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats. | |
output | o | Output format. One of: (json, yaml, name, go-template, go-template-file, template, templatefile, jsonpath, jsonpath-as-json, jsonpath-file). | |
field-manager | snctl-create | Name of the manager used to track field ownership. | |
dry-run | false | If true, only print the object that would be sent, without sending it. |
Create a secret with the specified name.
snctl create secret SECRET_NAME --data key1=value1 --data key2=value2
snctl create secret SECRET_NAME --instance-name pulsar-instance-name --data key1=value1 --data key2=value2
Create a secret for save your credential.
$ secret [NAME]
Name | Shorthand | Default | Usage |
---|---|---|---|
instance-name | Instance name | ||
pool-member-name | Pool member name | ||
location | Location | ||
data | [] | Data | |
show-managed-fields | false | If true, keep the managedFields when printing objects in JSON or YAML format. | |
template | Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview]. | ||
allow-missing-template-keys | true | If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats. | |
output | o | Output format. One of: (json, yaml, name, go-template, go-template-file, template, templatefile, jsonpath, jsonpath-as-json, jsonpath-file). | |
field-manager | snctl-create | Name of the manager used to track field ownership. | |
dry-run | false | If true, only print the object that would be sent, without sending it. |
Create a service account with the specified name.
snctl create serviceaccount SERVICE_ACCOUNT_NAME
Create a service account with the given file.
snctl create serviceaccount -f serviceaccount.yaml
Create a service account.
$ serviceaccount [NAME]
Name | Shorthand | Default | Usage |
---|---|---|---|
allow-missing-template-keys | true | If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats. | |
dry-run | false | If true, only print the object that would be sent, without sending it. | |
field-manager | snctl-create | Name of the manager used to track field ownership. | |
output | o | Output format. One of: (json, yaml, name, go-template, go-template-file, template, templatefile, jsonpath, jsonpath-as-json, jsonpath-file). | |
show-managed-fields | false | If true, keep the managedFields when printing objects in JSON or YAML format. | |
template | Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview]. |
Create a service account binding with the specified service account and poolmember name.
snctl create serviceaccountbinding SERVICE_ACCOUNT_BINDING_NAME --service-account-name NAME --pool-member streamnative/test
Create a service account binding with the specific name.
$ serviceaccountbinding [NAME]
Name | Shorthand | Default | Usage |
---|---|---|---|
allow-missing-template-keys | true | If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats. | |
dry-run | false | If true, only print the object that would be sent, without sending it. | |
field-manager | snctl-create | Name of the manager used to track field ownership. | |
output | o | Output format. One of: (json, yaml, name, go-template, go-template-file, template, templatefile, jsonpath, jsonpath-as-json, jsonpath-file). | |
pool-member | The poolmember name. | ||
service-account-name | The service account name. | ||
show-managed-fields | false | If true, keep the managedFields when printing objects in JSON or YAML format. | |
template | Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview]. |
Setup a subscription to StreamNative Cloud.
snctl create subscription [OFFER] -n [ORG-NAME]
Setup a subscription to StreamNative Cloud.
$ subscription [OFFER]
Name | Shorthand | Default | Usage |
---|---|---|---|
allow-missing-template-keys | true | If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats. | |
dry-run | false | If true, only print the object that would be sent, without sending it. | |
field-manager | snctl-create | Name of the manager used to track field ownership. | |
offer | The offer name. | ||
offer-type | public | The offer type (public or private). | |
output | o | Output format. One of: (json, yaml, name, go-template, go-template-file, template, templatefile, jsonpath, jsonpath-as-json, jsonpath-file). | |
show-managed-fields | false | If true, keep the managedFields when printing objects in JSON or YAML format. | |
template | Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview]. |
snctl create user USER_NAME --email USER_EMAIL
Create a user resource to register a user as a member of an organization.
$ user [NAME]
Name | Shorthand | Default | Usage |
---|---|---|---|
allow-missing-template-keys | true | If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats. | |
dry-run | false | If true, only print the object that would be sent, without sending it. | |
Email address of the user. | |||
field-manager | snctl-create | Name of the manager used to track field ownership. | |
output | o | Output format. One of: (json, yaml, name, go-template, go-template-file, template, templatefile, jsonpath, jsonpath-as-json, jsonpath-file). | |
show-managed-fields | false | If true, keep the managedFields when printing objects in JSON or YAML format. | |
template | Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview]. |
Create a volume.
$ volume [NAME]
Name | Shorthand | Default | Usage |
---|---|---|---|
allow-missing-template-keys | true | If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats. | |
bucket | The bucket of the volume. | ||
dry-run | false | If true, only print the object that would be sent, without sending it. | |
field-manager | snctl-create | Name of the manager used to track field ownership. | |
output | o | Output format. One of: (json, yaml, name, go-template, go-template-file, template, templatefile, jsonpath, jsonpath-as-json, jsonpath-file). | |
path | The path of the volume. | ||
region | The region of the volume. | ||
role-arn | The roleArn of the volume. | ||
show-managed-fields | false | If true, keep the managedFields when printing objects in JSON or YAML format. | |
template | Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview]. |
Apply the configuration in pulsarcluster.yaml to a pulsarcluster.
snctl apply -f ./pulsarcluster.yaml
Apply a configuration to a resource by the filename or stdin. The resource name must be specified. This resource will be created if it does not exist yet.
JSON and YAML formats are accepted.
$ apply (-f FILENAME | -k DIRECTORY)
Name | Shorthand | Default | Usage |
---|---|---|---|
filename | f | [] | The files that contain the configurations to apply. |
Print the detailed description of the Pulsar cluster
snctl describe pulsarcluster PULSAR_CLUSTER_NAME
Show details of a specific resource.
$ describe (-f FILENAME | TYPE [NAME_PREFIX | -l label] | TYPE/NAME)
$ auth
Activate a service account by supplying a key file.
snctl auth activate-service-account --key-file serviceaccount.json
Activate a service account by supplying its credentials.
$ activate-service-account
Name | Shorthand | Default | Usage |
---|---|---|---|
key-file | f | Path to the private key file. |
Export a service account to a file.
snctl auth export-service-account SERVICE_ACCOUNT_NAME --key-file serviceaccount.json
Export the service account credentials.
$ export-service-account [NAME]
Name | Shorthand | Default | Usage |
---|---|---|---|
key-file | f | Path to the private key file. | |
no-wait | false | Skip waiting for service account readiness. |
Get the pulsar instance access token with the login user.
snctl auth get-token PULSAR_INSTANCE_NAME --login
Get an access token for a Pulsar instance.
$ get-token [INSTANCE]
Name | Shorthand | Default | Usage |
---|---|---|---|
key-file | f | Path to the private key file | |
login | false | Adopt an interactive login. | |
skip-open | false | The Web browser are not opened automatically. |
Log in to the StreamNative Cloud.
snctl auth login
Log in to the StreamNative Cloud and skip opening the login window.
snctl auth login --skip-open
Authorize the tool to operate on behalf of a user.
$ login
Name | Shorthand | Default | Usage |
---|---|---|---|
no-refresh | false | The refresh tokens cannot be used. | |
skip-open | false | The Web browser are not opened automatically. |
Log out from the current account and clear the activation.
snctl auth logout
$ logout
Display the name of login user or service account.
snctl auth whoami
Display the logged-in user or service account.
$ whoami
$ config
Get the configs to be used in the CLI commands
snctl config get
$ get
Initialize the StreamNative cloud CLI configuration with default settings.
snctl config init
$ init
Set the default namespace to be used in the CLI commands
snctl config set --namespace streamnative
$ set
Name | Shorthand | Default | Usage |
---|---|---|---|
audience | Set the OAuth 2.0 audience identifier for the StreamNative Cloud API. | ||
cacert | Set the CA certificate for StreamNative Cloud API (PEM, base64). | ||
client-id | Set the OAuth 2.0 client identifier for the StreamNative Cloud CLI. | ||
insecure-skip-tls-verify | true | Indicate whether to skip TLS verification. | |
issuer-endpoint | Set the OAuth 2.0 issuer endpoint. | ||
logs-cluster | Set the default cluster to be used in logs CLI commands. | ||
logs-instance | Set the default instance to be used in logs CLI commands. | ||
logs-service-url | Set the service URL to be used in logs CLI commands. | ||
namespace | Set the default namespace to be used in CLI commands. | ||
organization | Set the default namespace to be used in CLI commands. | ||
proxy-location | Set the proxy location to be used in pulsar or kafka CLI commands. | ||
pulsar-cluster | Set the default cluster to be used in pulsar or kafka CLI commands. | ||
pulsar-instance | Set the default instance to be used in pulsar or kafka CLI commands. | ||
server | s | Set the service URL for StreamNative Cloud API. |
Delete a Pulsar cluster using the type and name specified in the 'pulsarcluster.yaml' file.
snctl delete -f ./pulsarcluster.yaml
Delete a resource by the resource name. The following example deletes a Pulsar instance.
snctl delete pulsarinstance PULSAR_INSTANCE_NAME
Delete resources by filenames, stdin, resources and names.
$ delete ([-f FILENAME] | [-k DIRECTORY] | TYPE [(NAME | -l label | --all)])
Name | Shorthand | Default | Usage |
---|---|---|---|
all | false | Delete all resources, in the namespace of the specified resource types. | |
all-namespaces | A | false | If present, list the requested object(s) across all namespaces. Namespace in current context is ignored even if specified with --namespace. |
cascade | background | Must be "background", "orphan", or "foreground". Selects the deletion cascading strategy for the dependents (e.g. Pods created by a ReplicationController). Defaults to background. | |
dry-run | none | Must be "none", "server", or "client". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource. | |
field-selector | Selector (field query) to filter on, supports '=', '==', and '!='.(e.g. --field-selector key1=value1,key2=value2). The server only supports a limited number of field queries per type. | ||
filename | f | [] | containing the resource to delete. |
force | false | If true, immediately remove resources from API and bypass graceful deletion. Note that immediate deletion of some resources may result in inconsistency or data loss and requires confirmation. | |
grace-period | -1 | Period of time in seconds given to the resource to terminate gracefully. Ignored if negative. Set to 1 for immediate shutdown. Can only be set to 0 when --force is true (force deletion). | |
ignore-not-found | false | Treat "resource not found" as a successful delete. Defaults to "true" when --all is specified. | |
interactive | i | false | If true, delete resource only when user confirms. |
kustomize | k | Process a kustomization directory. This flag can't be used together with -f or -R. | |
now | false | If true, resources are signaled for immediate shutdown (same as --grace-period=1). | |
output | o | Output mode. Use "-o name" for shorter output (resource/name). | |
raw | Raw URI to DELETE to the server. Uses the transport specified by the kubeconfig file. | ||
recursive | R | false | Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory. |
selector | l | Selector (label query) to filter on, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2). Matching objects must satisfy all of the specified label constraints. | |
timeout | 0s | The length of time to wait before giving up on a delete, zero means determine a timeout from the size of the object | |
wait | true | If true, wait for resources to be gone before returning. This waits for finalizers. |
Get all the created pulsar clusters.
snctl get pulsarcluster
Get all resources of the specified type.
$ get [(-o|--output=)json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-as-json|jsonpath-file|custom-columns|custom-columns-file|wide] (TYPE[.VERSION][.GROUP] [NAME | -l label] | TYPE[.VERSION][.GROUP]/NAME ...) [flags]
Name | Shorthand | Default | Usage |
---|---|---|---|
all-namespaces | A | false | If present, list the requested object(s) across all namespaces. Namespace in current context is ignored even if specified with --namespace. |
allow-missing-template-keys | true | If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats. | |
chunk-size | 500 | Return large lists in chunks rather than all at once. Pass 0 to disable. This flag is beta and may change in the future. | |
field-selector | Selector (field query) to filter on, supports '=', '==', and '!='.(e.g. --field-selector key1=value1,key2=value2). The server only supports a limited number of field queries per type. | ||
filename | f | [] | Filename, directory, or URL to files identifying the resource to get from a server. |
ignore-not-found | false | If the requested object does not exist the command will return exit code 0. | |
kustomize | k | Process the kustomization directory. This flag can't be used together with -f or -R. | |
label-columns | L | [] | Accepts a comma separated list of labels that are going to be presented as columns. Names are case-sensitive. You can also use multiple flag options like -L label1 -L label2... |
no-headers | false | When using the default or custom-column output format, don't print headers (default print headers). | |
output | o | Output format. One of: json|yaml|wide|name|custom-columns=...|custom-columns-file=...|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... | |
output-watch-events | false | Output watch event objects when --watch or --watch-only is used. Existing objects are output as initial ADDED events. | |
raw | Raw URI to request from the server. Uses the transport specified by the kubeconfig file. | ||
recursive | R | false | Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory. |
selector | l | Selector (label query) to filter on, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2). Matching objects must satisfy all of the specified label constraints. | |
server-print | true | If true, have the server return the appropriate table output. Supports extension APIs and CRDs. | |
show-kind | false | If present, list the resource type for the requested object(s). | |
show-labels | false | When printing, show all labels as the last column (default hide labels column) | |
show-managed-fields | false | If true, keep the managedFields when printing objects in JSON or YAML format. | |
sort-by | If non-empty, sort list types using this field specification. The field specification is expressed as a JSONPath expression (e.g. '{.metadata.name}'). The field in the API resource specified by this JSONPath expression must be an integer or a string. | ||
subresource | If specified, gets the subresource of the requested object. Must be one of [status scale]. This flag is beta and may change in the future. | ||
template | Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview]. | ||
watch | w | false | After listing/getting the requested object, watch for changes. |
watch-only | false | Watch for changes to the requested object(s), without listing/getting first. |
List all cloud API resources
snctl api-resource
Get all available API resources in snctl.
$ api-resources
Print the client and server versions for the current context
snctl version
Print the client and server version information.
$ version
Name | Shorthand | Default | Usage |
---|---|---|---|
client | false | Client version (No server version is required). | |
output | o | The output is in 'yaml' file or the 'json' format. | |
short | false | Print the version number only. |
$ x
Add a cluster to the Pulsar client configuration file.
snctl x update-pulsar-config --cluster-name <cluster>
$ update-pulsar-config
Name | Shorthand | Default | Usage |
---|---|---|---|
cluster-name | The name of the pulsar cluster. | ||
context-name | The name of the context to create. | ||
skip-use-context | false | If true, the current context is not changed. |
Display the logs of pulsar cluster
snctl logs \
-o organization \
-i instance \
-c cluster \
-p sink \
-f \
--since 10m \
--name logs \
--pulsar-tenant public \
--pulsar-namespace default \
--previous
Display the logs of pulsar cluster, the parameters service-url, organization, instance, cluster could be set by cmd snctl config set
, for example, set log service-url snctl config set --log-service-url http://localhost:8080
$ logs
Name | Shorthand | Default | Usage |
---|---|---|---|
cluster | c | Cluster Name | |
component | p | function | Name of function/sink/source |
follow | f | false | Continuous get logs without auto exit |
insecure-skip-tls-verify-backend | k | false | Skip verifying the identity. |
instance | i | Instance Name | |
key-file | Path to the private key file | ||
name | Component Name | ||
organization | o | Organization Name | |
previous | false | Browse the log with mode previous | |
pulsar-namespace | Pulsar Namespace | ||
pulsar-tenant | Pulsar Tenant | ||
replica-id | r | -1 | See which replica of which function, sink, source |
service-url | u | Log Service URL | |
since | Since time of logs, numbers end with s|m|h, for example one hour ago: 1h | ||
size | s | 20 | Logs tail size |
timestamp | Start timestamp of logs, for example: 1662430984225 |
$ revoke
Revoke an APIKey
snctl revoke apikey APIKEY_NAME
Revoke a APIKey.
$ apikey [NAME]
Name | Shorthand | Default | Usage |
---|---|---|---|
allow-missing-template-keys | true | If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats. | |
dry-run | false | If true, only print the object that would be sent, without sending it. | |
field-manager | snctl-revoke | Name of the manager used to track field ownership. | |
output | o | Output format. One of: (json, yaml, name, go-template, go-template-file, template, templatefile, jsonpath, jsonpath-as-json, jsonpath-file). | |
show-managed-fields | false | If true, keep the managedFields when printing objects in JSON or YAML format. | |
template | Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview]. |
Edit the resource named 'rolebinding'
snctl edit rolebinding
Use an alternative editor
KUBE_EDITOR="nano" kubectl edit rolebinding
Edit a resource from the default editor.
The edit command allows you to directly edit any API resource you can retrieve via the command-line tools. It will open the editor defined by your KUBE_EDITOR, or EDITOR environment variables, or fall back to 'vi' for Linux or 'notepad' for Windows. When attempting to open the editor, it will first attempt to use the shell that has been defined in the 'SHELL' environment variable. If this is not defined, the default shell will be used, which is '/bin/bash' for Linux or 'cmd' for Windows.
You can edit multiple objects, although changes are applied one at a time. The command accepts file names as well as command-line arguments, although the files you point to must be previously saved versions of resources.
Editing is done with the API version used to fetch the resource. To edit using a specific API version, fully-qualify the resource, version, and group.
The default format is YAML. To edit in JSON, specify "-o json".
The flag --windows-line-endings can be used to force Windows line endings, otherwise the default for your operating system will be used.
In the event an error occurs while updating, a temporary file will be created on disk that contains your unapplied changes. The most common error when updating a resource is another editor changing the resource on the server. When this occurs, you will have to apply your changes to the newer version of the resource, or update your temporary saved copy to include the latest resource version.
$ edit (RESOURCE/NAME | -f FILENAME)
Name | Shorthand | Default | Usage |
---|---|---|---|
allow-missing-template-keys | true | If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats. | |
field-manager | kubectl-edit | Name of the manager used to track field ownership. | |
filename | f | [] | Filename, directory, or URL to files to use to edit the resource |
kustomize | k | Process the kustomization directory. This flag can't be used together with -f or -R. | |
output | o | Output format. One of: (json, yaml, name, go-template, go-template-file, template, templatefile, jsonpath, jsonpath-as-json, jsonpath-file). | |
output-patch | false | Output the patch if the resource is edited. | |
recursive | R | false | Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory. |
save-config | false | If true, the configuration of current object will be saved in its annotation. Otherwise, the annotation will be unchanged. This flag is useful when you want to perform kubectl apply on this object in the future. | |
show-managed-fields | false | If true, keep the managedFields when printing objects in JSON or YAML format. | |
subresource | If specified, edit will operate on the subresource of the requested object. Must be one of [status]. This flag is beta and may change in the future. | ||
template | Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview]. | ||
validate | strict | Must be one of: strict (or true), warn, ignore (or false).| "true" or "strict" will use a schema to validate the input and fail the request if invalid. It will perform server side validation if ServerSideFieldValidation is enabled on the api-server, but will fall back to less reliable client-side validation if not.| "warn" will warn about unknown or duplicate fields without blocking the request if server-side field validation is enabled on the API server, and behave as "ignore" otherwise.| "false" or "ignore" will not perform any schema validation, silently dropping any unknown or duplicate fields. | |
windows-line-endings | false | Defaults to the line ending native to your platform. |
Configure StreamNative Cloud resources.
These commands help you make changes to existing StreamNative Cloud resources.
$ set SUBCOMMAND
Update a role binding for serviceaccount1
kubectl set subject rolebinding admin --serviceaccount=serviceaccount1
Update a role binding for user1, user2
kubectl set subject rolebinding admin --user=user1 --user=user2 --group=group1
Update the user, service account, or identity pool in a StreamNative Cloud role binding.
$ subject TYPE NAME [--user=username] [--identitypool=identitypoolname] [--serviceaccount=serviceaccountname] [--dry-run=server|client|none] [--remove-extra-subjects]
Name | Shorthand | Default | Usage |
---|---|---|---|
all | false | Select all resources, in the namespace of the specified resource types | |
allow-missing-template-keys | true | If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats. | |
dry-run | none | Must be "none", "server", or "client". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource. | |
field-manager | snctl-set | Name of the manager used to track field ownership. | |
filename | f | [] | Filename, directory, or URL to files the resource to update the subjects |
identitypool | [] | IdentityPool(s) to which the role is bound. | |
kustomize | k | Process the kustomization directory. This flag can't be used together with -f or -R. | |
local | false | If true, set subject will NOT contact api-server but run locally. | |
output | o | Output format. One of: (json, yaml, name, go-template, go-template-file, template, templatefile, jsonpath, jsonpath-as-json, jsonpath-file). | |
recursive | R | false | Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory. |
remove-extra-subjects | false | If true, removes extra subjects from the role binding | |
selector | l | Selector (label query) to filter on, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2) | |
serviceaccount | [] | Service accounts to bind to the role | |
show-managed-fields | false | If true, keep the managedFields when printing objects in JSON or YAML format. | |
template | Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview]. | ||
user | [] | Usernames to bind to the role |
$ usage-data get -h
$ get
$ local
Name | Shorthand | Default | Usage |
---|---|---|---|
auth-params | auth params | ||
auth-plugin | org.apache.pulsar.client.impl.auth.AuthenticationToken | auth plugin | |
csv-file-path | o | the path to the exported csv file. If not set, it will not be saved as a CSV file. | |
url | u | pulsar://localhost:6650 | Pulsar service URL |
$ sncloud
Name | Shorthand | Default | Usage |
---|---|---|---|
auth-params | auth params | ||
auth-plugin | org.apache.pulsar.client.impl.auth.AuthenticationToken | auth plugin | |
csv-file-path | o | the path to the exported csv file. If not set, it will not be saved as a CSV file. | |
org | cloud organization ID | ||
pm | pool member ID | ||
url | u | pulsar+ssl://pc-9293889f.aws-use2-production-snci-pool-kid.streamnative.aws.snio.cloud:6651 | Pulsar service URL |
$ kafka [command]
Name | Shorthand | Default | Usage |
---|---|---|---|
as-service-account | Perform this operation as the specified service account | ||
pulsar-cluster | If present, override the pulsar-cluster scope for this CLI request in pulsar subcommands | ||
pulsar-instance | If present, override the pulsar-instance scope for this CLI request in pulsar subcommands | ||
use-service-account | false | Interactively select a service account to perform this operation |
Commands for administering Kafka (topics, partitions, consumer groups, etc.)
$ admin [command]
Perform operations on Kafka Connect
$ connect
$ apply
Name | Shorthand | Default | Usage |
---|---|---|---|
config-file | f | Configuration file to apply | |
dry-run | false | Validate the configuration without applying changes |
$ delete
$ connector [connector-name]
Reset all offsets for a connector
snctl kafka admin connect delete offsets my-connector
Resets all offsets for the specified connector.
This command requires Kafka Connect 3.6 or above.
This operation is potentially destructive and may result in data duplication. Use with caution.
$ offsets CONNECTOR
Name | Shorthand | Default | Usage |
---|---|---|---|
force | false | Skip confirmation prompt |
Display detailed information about connectors or plugins
$ describe
$ connector [connector-name]
Name | Shorthand | Default | Usage |
---|---|---|---|
output | o | text | Output format (text, json) |
$ plugin [plugin-class]
Name | Shorthand | Default | Usage |
---|---|---|---|
output | o | text | Output format (text, json) |
Display information about resources.
Resource types:
connectors: List all deployed connectors
plugins: List all available connector plugins
offsets: List connector offsets
$ get [resource-type]
$ connectors
Name | Shorthand | Default | Usage |
---|---|---|---|
output | o | text | Output format (text, json) |
Display the offsets for a connector
snctl kafka admin connect get offsets my-connector
Displays information about the committed offsets for the specified connector.
$ offsets CONNECTOR
Name | Shorthand | Default | Usage |
---|---|---|---|
output | o | text | Output format. One of: json|text |
$ plugins
Name | Shorthand | Default | Usage |
---|---|---|---|
output | o | text | Output format (text, json) |
$ info
Name | Shorthand | Default | Usage |
---|---|---|---|
output | o | text | Output format (text, json) |
$ patch
Patches the specified connector(s) with the given configuration parameters.
Examples: // Set a single configuration parameter
snctl kafka connect patch connector my-connector -s key=value
// Set multiple configuration parameters
snctl kafka connect patch connector my-connector -s key1=value1 -s key2=value2
// Remove configuration parameters
snctl kafka connect patch connector my-connector -r key1 -r key2
// Both set and remove parameters
snctl kafka connect patch connector my-connector -s key1=value1 -r key2
$ connector [connector-name]
Name | Shorthand | Default | Usage |
---|---|---|---|
output | o | text | Output format (text, json) |
reg-exp | e | false | Use connector name as regexp pattern |
remove | r | [] | Remove a configuration parameter |
set | s | [] | Set a configuration parameter (format: key=value) |
Alter offsets for a sink connector
snctl kafka connect patch offsets my-sink-connector --kafka-topic mytopic --kafka-partition 0 --kafka-offset 100
Alter offsets for a source connector
snctl kafka connect patch offsets my-source-connector --source-partition '{"template": "my-template"}' --source-offset '{"position": 1000}'
Alters offsets for the specified connector.
This command requires Kafka Connect 3.6 or above.
This operation is potentially destructive and may result in data duplication or data loss.
Use with caution.
$ offsets CONNECTOR
Name | Shorthand | Default | Usage |
---|---|---|---|
force | false | Skip confirmation prompt | |
kafka-offset | 0 | Desired offset of the Kafka topic (for sink connectors) | |
kafka-partition | 0 | Partition of the Kafka topic (for sink connectors) | |
kafka-topic | Name of the Kafka topic (for sink connectors) | ||
source-offset | Desired offset (for source connectors), as a JSON object | ||
source-partition | Partition (for source connectors), as a JSON object |
Pause a connector and its tasks
$ pause [connector-name]
$ restart
$ connector [connector-name]
$ task [connector-name] [task-id]
Resume a paused connector and its tasks
$ resume [connector-name]
Stop a connector and its tasks (but don't delete it)
$ stop [connector-name]
Commands for managing Kafka consumer groups (list, describe, delete, reset offsets)
$ groups
Delete a Kafka consumer group.
Examples: // Delete a consumer group
snctl kafka admin groups delete my-group
$ delete [group-id]
Name | Shorthand | Default | Usage |
---|---|---|---|
output | o | text | Output format (text, json) |
Show detailed information about a Kafka consumer group.
Examples: // Describe a consumer group
snctl kafka admin groups describe my-group
// Output in JSON format
snctl kafka admin groups describe my-group -o json
$ describe [group-id]
Name | Shorthand | Default | Usage |
---|---|---|---|
output | o | text | Output format (text, json) |
List all available Kafka consumer groups.
Examples: // List all consumer groups
snctl kafka admingroups list
// Output in JSON format
snctl kafka admingroups list -o json
$ list
Name | Shorthand | Default | Usage |
---|---|---|---|
output | o | text | Output format (text, json) |
Reset offsets for a consumer group for a specific topic.
Examples: // Dry run to see what would happen if resetting offsets to the beginning
snctl kafka admin groups reset-offsets my-group --topic my-topic --to oldest
// Reset offsets to the beginning
snctl kafka admin groups reset-offsets my-group --topic my-topic --to oldest --execute
// Reset offsets to the end
snctl kafka admin groups reset-offsets my-group --topic my-topic --to newest --execute
// Reset offsets to a specific offset
snctl kafka admin groups reset-offsets my-group --topic my-topic --to 100 --execute
// Reset offsets 10 messages back
snctl kafka admin groups reset-offsets my-group --topic my-topic --to relative --offset -10 --execute
$ reset-offsets [group-id]
Name | Shorthand | Default | Usage |
---|---|---|---|
execute | false | Actually execute the reset (default is dry run) | |
newest | false | Reset to newest offset | |
offset | 0 | Reset to this specific offset | |
oldest | false | Reset to oldest offset | |
output | o | text | Output format (text, json) |
relative | 0 | Reset to a relative offset (can be negative to go back) | |
to | Where to reset offsets to (newest, oldest, or specific offset) | ||
topic | Topic name |
Commands for managing Kafka partitions (list, add, describe)
$ partitions
Add partitions to an existing Kafka topic.
Examples: // Add partitions to a topic, increasing the total to 5
snctl kafka admin partitions add mytopic --new-total 5
$ add [topic-name]
Name | Shorthand | Default | Usage |
---|---|---|---|
new-total | 0 | New total number of partitions | |
output | o | text | Output format (text, json) |
Show detailed information about a specific partition of a Kafka topic.
Examples: // Describe partition 0 of a topic
snctl kafka admin partitions describe mytopic --partition 0
// Output in JSON format
snctl kafka admin partitions describe mytopic --partition 0 -o json
$ describe [topic-name]
Name | Shorthand | Default | Usage |
---|---|---|---|
output | o | text | Output format (text, json) |
partition | 0 | Partition ID |
List all partitions for a Kafka topic.
Examples: // List partitions for a topic
snctl kafka admin partitions list mytopic
// Output in JSON format
snctl kafka admin partitions list mytopic -o json
$ list [topic-name]
Name | Shorthand | Default | Usage |
---|---|---|---|
output | o | text | Output format (text, json) |
Perform operations on the Kafka Schema Registry
$ schemas
$ compatibility
$ get [subject]
Name | Shorthand | Default | Usage |
---|---|---|---|
global | false | Get global compatibility setting | |
output | o | text | Output format (text, json) |
$ set subject
Name | Shorthand | Default | Usage |
---|---|---|---|
level | l | Compatibility level (NONE, BACKWARD, BACKWARD_TRANSITIVE, FORWARD, FORWARD_TRANSITIVE, FULL, FULL_TRANSITIVE) | |
output | o | text | Output format (text, json) |
$ create [subject]
Name | Shorthand | Default | Usage |
---|---|---|---|
file | f | Path to the schema file | |
output | o | text | Output format (text, json) |
type | t | Schema type (AVRO, JSON, PROTOBUF) |
$ delete
$ subject [subject]
Name | Shorthand | Default | Usage |
---|---|---|---|
force | f | false | Skip confirmation prompt |
output | o | text | Output format (text, json) |
permanent | false | Permanently delete the schema |
Delete a specific version of a schema. The version can be a specific number or 'latest'.
$ version [subject] [version]
Name | Shorthand | Default | Usage |
---|---|---|---|
force | f | false | Skip confirmation prompt |
output | o | text | Output format (text, json) |
permanent | false | Permanently delete the schema version |
$ get [subject]
Name | Shorthand | Default | Usage |
---|---|---|---|
output | o | text | Output format (text, json) |
$ list
Name | Shorthand | Default | Usage |
---|---|---|---|
output | o | text | Output format (text, json) |
$ types
Name | Shorthand | Default | Usage |
---|---|---|---|
output | o | text | Output format (text, json) |
$ versions
$ get [subject] [version]
Name | Shorthand | Default | Usage |
---|---|---|---|
output | o | text | Output format (text, json) |
$ list [subject]
Name | Shorthand | Default | Usage |
---|---|---|---|
output | o | text | Output format (text, json) |
Commands for managing Kafka topics (create, delete, list, describe, etc.)
$ topics
Create a new Kafka topic with specified configuration.
Examples: // Create a topic with default settings
snctl kafka admintopics create mytopic
// Create a topic with custom partitions and replication
snctl kafka admintopics create mytopic --partitions 3 --replication-factor 2
// Create a topic with custom configs
snctl kafka admintopics create mytopic --config retention.ms=86400000 --config cleanup.policy=compact
$ create [topic-name]
Name | Shorthand | Default | Usage |
---|---|---|---|
config | [] | Topic configuration (key=value) | |
output | o | text | Output format (text, json) |
partitions | 1 | Number of partitions | |
replication-factor | 1 | Replication factor |
Delete a Kafka topic.
Examples: // Delete a topic
snctl kafka admin topics delete mytopic
$ delete
Name | Shorthand | Default | Usage |
---|---|---|---|
output | o | text | Output format (text, json) |
Show detailed information about a Kafka topic.
Examples: // Describe a topic
snctl kafka admin topics describe mytopic
// Output in JSON format
snctl kafka admin topics describe mytopic -o json
$ describe [topic-name]
Name | Shorthand | Default | Usage |
---|---|---|---|
broker-id-to-addr | false | Map broker IDs to broker addresses | |
client-id | Client ID for the admin client | ||
output | o | text | Output format (text, json) |
List all available Kafka topics.
Examples: // List all topics
snctl kafka admintopics list
// List all topics including internal ones
snctl kafka admintopics list --include-internal
// Output in JSON format
snctl kafka admintopics list -o json
$ list
Name | Shorthand | Default | Usage |
---|---|---|---|
include-internal | false | Include internal topics (starting with _) | |
output | o | text | Output format (text, json) |
Commands for interacting with Kafka as a client (producing, consuming messages)
$ client [command]
Consume messages from a Kafka topic.
Examples: // Consume messages from a topic
snctl kafka client consume --topic mytopic
// Consume messages using a consumer group
snctl kafka client consume --topic mytopic --group mygroup
// Consume a specific number of messages
snctl kafka client consume --topic mytopic --num-messages 10
// Consume messages from the beginning of the topic
snctl kafka client consume --topic mytopic --from-beginning
// Show message keys and timestamps
snctl kafka client consume --topic mytopic --show-key --show-timestamp
// Output in JSON format
snctl kafka client consume --topic mytopic --output json
$ consume
Name | Shorthand | Default | Usage |
---|---|---|---|
from-beginning | false | Consume from the beginning of the topic | |
group | g | Consumer group name | |
hide-payload | false | Hide message payload | |
num-messages | N | 0 | Number of messages to consume (0 means infinite) |
offset | newest | Initial offset (oldest, newest) | |
output | o | text | Output format (text, json) |
partition | p | 0 | Partition to consume from (ignored when using consumer groups) |
show-headers | false | Show message headers | |
show-key | false | Show message key | |
show-timestamp | false | Show message timestamp | |
timeout | 1m0s | Timeout for consuming messages | |
topic | t | Topic to consume from |
Produce one or more messages to a Kafka topic.
Examples: // Produce a single message
snctl kafka client produce --topic mytopic --message "Hello World"
// Produce multiple messages
snctl kafka client produce --topic mytopic --message "Message 1" --message "Message 2"
// Produce messages from files
snctl kafka client produce --topic mytopic --message-file message1.txt --message-file message2.txt
// Produce messages from stdin
cat message.txt | snctl kafka client produce --topic mytopic --read-from-stdin
// Produce messages with a specific key
snctl kafka client produce --topic mytopic --message "Hello World" --key "my-key"
// Produce messages with properties
snctl kafka client produce --topic mytopic --message "Hello World" --property "prop1=value1" --property "prop2=value2"
$ produce
Name | Shorthand | Default | Usage |
---|---|---|---|
key | k | Key for the message(s) | |
key-file | File containing the message key | ||
message | m | [] | Message content to send (can be specified multiple times) |
message-file | f | [] | File containing message content (can be specified multiple times) |
num-times | N | 1 | Number of times to produce each message |
property | p | [] | Message properties as key=value (can be specified multiple times) |
rate | 0 | Rate limit for producing messages (messages per second) | |
read-from-stdin | false | Read message from stdin | |
separator | |||
Line separator when reading from stdin | |||
topic | t | Topic to produce to |
Test connection to Kafka cluster.
Examples: // Test connection to the currently configured Kafka cluster
snctl kafka client test
$ test
$ pulsar [command]
Name | Shorthand | Default | Usage |
---|---|---|---|
as-service-account | Perform this operation as the specified service account | ||
pulsar-cluster | If present, override the pulsar-cluster scope for this CLI request in pulsar subcommands | ||
pulsar-instance | If present, override the pulsar-instance scope for this CLI request in pulsar subcommands | ||
use-service-account | false | Interactively select a service account to perform this operation |
Administration commands for managing Apache Pulsar resources
$ admin [command]
$ broker-stats
Dump the allocator stats
pulsarctl broker-stats allocator-stats
Dump the allocator stats
This command requires super-user permissions.
//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
$ allocator-stats
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 |
Dump the broker load-report
pulsarctl broker-stats load-report
Dump the broker load-report
This command requires super-user permissions.
//normal output
Print the broker load-report info
$ load-report
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 |
Dump the mbean stats
pulsarctl broker-stats mbeans
Dump the mbean stats
This command requires super-user permissions.
//normal output
Get all the mbean details of this broker JVM
$ mbeans
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 |
Dumps the metrics for Monitoring
pulsarctl broker-stats monitoring-metrics
Dumps the metrics for Monitoring
This command requires super-user permissions.
//normal output
Get all the metrics details for Monitoring
$ monitoring-metrics
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 |
Dump the topics stats
pulsarctl broker-stats topics
Dump the topics stats
This command requires super-user permissions.
//normal output
Get all stats details of broker.
$ topics
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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
Delete dynamic-serviceConfiguration of broker
pulsarctl brokers delete-dynamic-config --config (config name)
Delete dynamic-serviceConfiguration of broker
This command requires super-user permissions.
//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
$ delete-dynamic-config
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 overridden dynamic-configuration values
pulsarctl brokers get-all-dynamic-config
Get all overridden dynamic-configuration values
This command requires super-user permissions.
//normal output
{
"dispatchThrottlingRatePerTopicInMsg": "true"
}
$ get-all-dynamic-config
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 configuration information
pulsarctl brokers get-internal-config
Get internal configuration information
This command requires super-user permissions.
//normal output
{
"zookeeperServers": "127.0.0.1:2181",
"configurationStoreServers": "127.0.0.1:2181",
"ledgersRootPath": "/ledgers",
"stateStorageServiceUrl": "bk://127.0.0.1:4181"
}
$ get-internal-config
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 configuration values
pulsarctl brokers get-runtime-config
Get runtime configuration values
This command requires super-user permissions.
//normal output
{
“activeConsumerFailoverDelayTimeMillis”: “1000",
“advertisedAddress”: “127.0.0.1",
“allowAutoTopicCreation”: “true”,
“anonymousUserRole”: “”,
“authenticateOriginalAuthData”: “false”,
“authenticationEnabled”: “false”,
...
}
$ get-runtime-config
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 |
Run a health check against the broker
pulsarctl brokers healthcheck
Run a health check against the broker
This command requires super-user permissions.
//normal output
ok
$ healthcheck
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 active brokers of the cluster
pulsarctl brokers list (cluster-name)
List active brokers of the cluster
This command requires super-user permissions.
//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
$ list
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 all overridden dynamic-configuration values
pulsarctl brokers list-dynamic-config
Get all overridden dynamic-configuration values
This command requires super-user permissions.
//normal output
dispatchThrottlingRatePerTopicInMsg
loadBalancerSheddingEnabled
brokerClientAuthenticationParameters
...
$ list-dynamic-config
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 namespaces owned by the broker
pulsarctl brokers namespaces (cluster-name) --url (eg:127.0.0.1:8080)
List namespaces owned by the broker
This command requires super-user permissions.
//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
$ namespaces
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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-serviceConfiguration of broker
pulsarctl brokers update-dynamic-config --config (config name) --value (config value)
Update dynamic-serviceConfiguration of broker
This command requires super-user permissions.
//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
$ update-dynamic-config
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 |
$ clusters
Provisions a new cluster
pulsarctl clusters create (cluster-name)
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.
This command requires super-user permissions.
//normal output
Cluster (cluster-name) added
$ add
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 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)
This command is used for creating a failure domain of the (cluster-name).
This command requires super-user permissions.
//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.
$ create-failure-domain
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 |
deleting the cluster named (cluster-name)
pulsarctl clusters delete (cluster-name)
This command is used for deleting an existing cluster.
This command requires super-user permissions.
//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.
$ delete
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 the failure domain
pulsarctl clusters delete-failure-domain (cluster-name) (domain-name)
This command is used for deleting the failure domain (domain-name) of the cluster (cluster-name)
This command requires super-user permissions.
//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.
$ delete-failure-domain
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 |
getting the (cluster-name) data
pulsarctl clusters get (cluster-name)
This command is used for getting the cluster data of the specified cluster.
This command requires super-user permissions.
//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.
$ get
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 |
getting the broker list in the (cluster-name) cluster failure domain (domain-name)
pulsarctl clusters get-failure-domain (cluster-name) (domain-name)
This command is used for getting the specified failure domain on the specified cluster.
This command requires super-user permissions.
//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.
$ get-failure-domain
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 |
getting the (cluster-name) peer clusters
pulsarctl clusters get-peer-clusters (cluster-name)
This command is used for getting the peer clusters of the specified cluster.
This command requires super-user permissions.
//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.
$ get-peer-clusters
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 the existing clusters
pulsarctl clusters list
This command is used for listing the list of available pulsar clusters.
$ list
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 |
listing all the failure domains under the specified cluster
pulsarctl clusters list-failure-domains (cluster-name)
This command is used for getting all failure domain under the cluster (cluster-name).
This command requires super-user permissions.
//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.
$ list-failure-domains
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 |
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)
This command is used for updating the cluster data of the specified cluster.
This command requires super-user permissions.
//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.
$ update
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 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)
This command is used for updating a failure domain of the (cluster-name).
This command requires super-user permissions.
//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.
$ update-failure-domain
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 |
updating the
peer clusters
pulsarctl clusters update-peer-clusters -p cluster-a -p cluster-b (cluster-name)
This command is used for updating peer clusters.
This command requires super-user permissions.
//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.
$ update-peer-clusters
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 |
$ functions
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
This command is used for creating a new Pulsar Function in cluster mode.
This command requires super-user permissions.
//normal output
Created (the name of a Pulsar Function) successfully
$ create
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 | |
batch-builder | BatcherBuilder provides two types of batch construction methods, DEFAULT and KEY_BASED.The default value is: DEFAULT | ||
bookie-service-url | The bookie web service url that pulsarctl connects to. | ||
classname | The class name of a Pulsar Function | ||
cleanup-subscription | true | Whether delete the subscription when function is deleted | |
cpu | 0 | The cpu in cores that need to be allocated per function instance(applicable only to docker runtime) | |
custom-runtime-options | A string that encodes options to customize the runtime, see docs for configured runtime for details #Java | ||
custom-schema-inputs | The map of input topics to Schema class names (as a JSON string) | ||
custom-schema-outputs | The map of input topics to Schema properties (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) | |
forward-source-message-property | true | Forwarding input message's properties to output topic when processing (use false to disable it) | |
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 | ||
function-type | t | The built-in Pulsar Function type | |
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. | ||
input-specs | The map of inputs to custom configuration (as a JSON string) | ||
input-type-class-name | The class name of input type class | ||
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 | ||
output-type-class-name | The class name of output type class | ||
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 | ||
producer-config | The custom producer configuration (as a JSON string) | ||
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-key-ordering | false | Function consumes and processes messages in key order | |
retain-ordering | false | Function consumes and processes messages in order | |
schema-type | The builtin schema type or custom schema class name to be used for messages output by the function | ||
secrets | The map of secretName to an object that encapsulates how the secret is fetched by the underlying secrets provider | ||
skip-to-latest | false | Whether or not the consumer skip to latest message upon function instance restart | |
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 | ||
subs-position | Pulsar source subscription position if user wants to consume messages from the specified location | ||
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 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]
This command is used for delete a Pulsar Function that is running on a Pulsar cluster.
This command requires super-user permissions.
//normal output
Deleted
//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
$ delete
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 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>
This command is used for download File Data from Pulsar.
This command requires super-user permissions.
//normal output
Downloaded
//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)
$ download
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 |
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]
Fetch information about a Pulsar Function
This command requires super-user permissions.
//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
$ get
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 all Pulsar Functions running under a specific tenant and namespace
pulsarctl functions list
--tenant public
--namespace default
List all Pulsar Functions running under a specific tenant and namespace.
This command requires super-user permissions.
//normal output
+--------------------+
| Function Name |
+--------------------+
| test_function_name |
+--------------------+
$ list
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 |
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)
Put a key/value pair to the state associated with a Pulsar Function.
This command requires namespace function permissions.
//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
$ putstate
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 |
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)
Fetch a key/value pair from the state associated with a Pulsar Function.
This command requires namespace function permissions.
//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
//key
error: key
$ querystate
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 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]
This command is used for restarting function instance.
This command requires super-user permissions.
//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
$ restart
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 |
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]
This command is used for starting a stopped function instance.
This command requires super-user permissions.
//normal output
Started
//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
//Used an instanceID that does not exist or other impermissible actions
[✖] code: 400 reason: Operation not permitted
$ start
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 |
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]
Get the current stats of a Pulsar Function.
This command requires namespace function permissions.
//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
$ stats
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 |
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]
Check the current status of a Pulsar Function.
This command requires namespace function permissions.
//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
$ status
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 |
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]
This command is used for stopping function instance.
This command requires super-user permissions.
//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
$ stop
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 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)
Trigger the specified Pulsar Function with a supplied value.
This command requires namespace function permissions.
//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
$ trigger
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 |
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
Update a Pulsar Function that has been deployed to a Pulsar cluster.
This command requires super-user permissions.
//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
$ update
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 | |
batch-builder | BatcherBuilder provides two types of batch construction methods, DEFAULT and KEY_BASED.The default value is: DEFAULT | ||
bookie-service-url | The bookie web service url that pulsarctl connects to. | ||
classname | The class name of a Pulsar Function | ||
cleanup-subscription | true | Whether delete the subscription when function is deleted | |
cpu | 0 | The cpu in cores that need to be allocated per function instance(applicable only to docker runtime) | |
custom-runtime-options | A string that encodes options to customize the runtime, see docs for configured runtime for details #Java | ||
custom-schema-inputs | The map of input topics to Schema class names (as a JSON string) | ||
custom-schema-outputs | The map of input topics to Schema properties (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) | |
forward-source-message-property | true | Forwarding input message's properties to output topic when processing (use false to disable it) | |
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 | ||
function-type | t | The built-in Pulsar Function type | |
go | Path to the main Go executable binary for the function (if the function is written in Go) | ||
input-specs | The map of inputs to custom configuration (as a JSON string) | ||
input-type-class-name | The class name of input type class | ||
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 | ||
output-type-class-name | The class name of output type class | ||
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 | ||
producer-config | The custom producer configuration (as a JSON string) | ||
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) | |
retain-key-ordering | false | Function consumes and processes messages in key order | |
retain-ordering | false | Function consumes and processes messages in order | |
schema-type | The builtin schema type or custom schema class name to be used for messages output by the function | ||
secrets | The map of secretName to an object that encapsulates how the secret is fetched by the underlying secrets provider | ||
skip-to-latest | false | Whether or not the consumer skip to latest message upon function instance restart | |
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 | ||
subs-position | Pulsar source subscription position if user wants to consume messages from the specified location | ||
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 a local file to Pulsar
pulsarctl functions upload --source-file <file-path> --path public/default/test
This command is used for uploading a local file to Pulsar.
This command requires super-user permission.
$ upload
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 |
$ functions-worker
Dump all functions stats running on this broker
pulsarctl functions-worker function-stats
Dump all functions stats running on this broker
This command requires super-user permissions.
//normal output
[ ]
$ function-stats
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 all workers belonging to this cluster
pulsarctl functions-worker get-cluster
Get all workers belonging to this cluster
This command requires super-user permissions.
//normal output
[
{
"workerId": "c-standalone-fw-127.0.0.1-8080",
"workerHostname": "127.0.0.1",
"port": 8080
}
]
$ get-cluster
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 the leader of the worker cluster
pulsarctl functions-worker get-cluster-leader
Get the leader of the worker cluster
This command requires super-user permissions.
//normal output
{
"workerId": "c-standalone-fw-127.0.0.1-8080",
"workerHostname": "127.0.0.1",
"port": 8080
}
$ get-cluster-leader
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 the assignments of the functions across the worker cluster
pulsarctl functions-worker get-function-assignments
Get the assignments of the functions across the worker cluster
This command requires super-user permissions.
//normal output
[ ]
$ get-function-assignments
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 |
Dump metrics for Monitoring
pulsarctl functions-worker monitoring-metrics
Dump metrics for Monitoring
This command requires super-user permissions.
//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"
}
}
]
$ monitoring-metrics
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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
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)
This command is used for clearing backlog for all topics of a namespace.
This command requires tenant admin permissions.
//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 : [
$ clear-backlog
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 of the namespace (namespace-name)
pulsarctl namespaces clear-offload-deletion-lag (namespace-name)
This command is used for clearing offload deletion lag of a namespace.
This command requires super-user permissions and broker has write policies permission.
//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 : [
$ clear-offload-deletion-lag
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 |
creates a namespace named (namespace-name)
pulsarctl namespaces create (namespace-name)
Creates a new namespace
This command requires tenant admin permissions.
//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].
$ create
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 a namespace
pulsarctl namespaces delete (namespace-name)
Delete a namespace. The namespace needs to be empty
This command requires tenant admin permissions.
//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
$ delete
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 an anti-affinity group of a namespace
pulsarctl namespaces delete-anti-affinity-group tenant/namespace
Delete an anti-affinity group of a namespace
This command requires tenant admin permissions.
//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
$ delete-anti-affinity-group
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 the anti-affinity group of a namespace
pulsarctl namespaces get-anti-affinity-group tenant/namespace
Get the anti-affinity group of a namespace
This command requires tenant admin permissions.
//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
$ get-anti-affinity-group
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 the list of namespaces in the same anti-affinity group.
pulsarctl namespaces get-anti-affinity-namespaces tenant/namespace
Get the list of namespaces in the same anti-affinity group.
This command requires tenant admin permissions.
//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
$ get-anti-affinity-namespaces
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 the backlog quota policy of a namespace
pulsarctl namespaces get-backlog-quotas tenant/namespace
Get the backlog quota policy of a namespace
This command requires tenant admin permissions.
//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
$ get-backlog-quotas
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 the replicated clusters of a namespace
pulsarctl namespaces get-clusters tenant/namespace
Get the replicated clusters of a namespace
This command requires tenant admin permissions.
//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
$ get-clusters
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 of the namespace (namespace-name)
pulsarctl namespaces get-compaction-threshold (namespace-name)
This command is used for getting compaction threshold of a namespace.
This command requires tenant admin permissions.
//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 : [
$ get-compaction-threshold
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 the default message dispatch rate of namespace (namespace-name)
pulsarctl namespaces get-dispatch-rate (namespace)
This command is used for getting the default message dispatch rate of a namespace.
This command requires tenant admin permissions.
//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 : [
$ get-dispatch-rate
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 the whether to allow auto update schema on a namespace
pulsarctl namespaces get-is-allow-auto-update-schema (namespace-name)
Get the whether to allow auto update schema on a namespace
This command requires tenant admin permissions
$ get-is-allow-auto-update-schema
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 the max consumers per subscription of the namespace (namespace-name)
pulsarctl namespaces get-max-consumers-per-subscription (namespace-name)
This command is used for getting the max consumers per subscription of a namespace.
This command requires tenant admin permissions.
//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 : [
$ get-max-consumers-per-subscription
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 the max consumers per topic of the namespace (namespace-name)
pulsarctl namespaces get-max-consumers-per-topic (namespace-name)
This command is used for getting the max consumers per topic of a namespace.
This command requires tenant admin permissions.
//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 : [
$ get-max-consumers-per-topic
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 the max producers per topic of the namespace (namespace-name)
pulsarctl namespaces get-max-producers-per-topic (namespace-name)
This command is used for getting the max producers per topic of a namespace.
This command requires tenant admin permissions.
//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 : [
$ get-max-producers-per-topic
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 settings of a namespace
pulsarctl namespaces get-message-ttl tenant/namespace
Get message TTL settings of a namespace
This command requires tenant admin permissions.
//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
$ get-message-ttl
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 the offload deletion lag of the namespace (namespace-name)
pulsarctl namespaces get-offload-deletion-lag (namespace-name)
This command is used for getting the offload deletion lag of a namespace.
This command requires tenant admin permissions.
//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 : [
$ get-offload-deletion-lag
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 the offload threshold of the namespace (namespace-name)
pulsarctl namespaces get-offload-threshold (namespace-name)
This command is used for getting the offload threshold of a namespace.
This command requires tenant admin permissions.
//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 : [
$ get-offload-threshold
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 the persistence policy of a namespace
pulsarctl namespaces get-persistence tenant/namespace
Get the persistence policy of a namespace
This command requires tenant admin permissions.
//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
$ get-persistence
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 the default message publish rate of namespace (namespace-name)
pulsarctl namespaces get-publish-rate (namespace)
This command is used for getting the default message publish rate of a namespace.
This command requires tenant admin permissions.
//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 : [
$ get-publish-rate
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 the default replicator message dispatch rate of the namespace (namespace-name)
pulsarctl namespaces get-replicator-dispatch-rate (namespace)
This command is used for getting the default replicator message dispatch rate of a namespace.
This command requires tenant admin permissions.
//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 : [
$ get-replicator-dispatch-rate
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 the retention policy of a namespace
pulsarctl namespaces get-retention tenant/namespace
Get the retention policy of a namespace
This command requires tenant admin permissions.
//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
$ get-retention
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 the schema auto-update strategy of the namespace (namespace-name)
pulsarctl namespaces get-schema-autoupdate-strategy (namespace-name)
This command is used for getting the schema auto-update strategy of a namespace.
This command requires super-user permissions and broker has write policies permission.
//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 : [
$ get-schema-autoupdate-strategy
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 status
pulsarctl namespaces get-schema-validation-enforced <namespace-name>
This command is used for getting the schema validation enforced.
This command requires super-user and tenant admin permissions.
//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 : [
$ get-schema-validation-enforced
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 the default subscribe rate per consumer of a namespace (namespace-name)
pulsarctl namespaces get-subscribe-rate (namespace)
This command is used for getting the default subscribe rate per consumer of a namespace.
This command requires tenant admin permissions.
//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 : [
$ get-subscribe-rate
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 the default subscription message dispatch rate of namespace (namespace-name)
pulsarctl namespaces get-subscription-dispatch-rate (namespace-name)
This command is used for getting the default subscription message dispatch rate of a namespace.
This command requires tenant admin permissions.
//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 : [
$ get-subscription-dispatch-rate
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 (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)
This command is used for granting permissions to a client role to access a namespace.
This command requires tenant admin permissions.
//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 : [
$ grant-permission
Name | Shorthand | Default | Usage |
---|---|---|---|
actions | [] | Actions to be granted (produce,consume,sources,sinks,functions,packages) | |
admin-service-url | s | 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 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)
This command is used for granting client roles to access a subscription of a namespace.
This command requires super-user permissions.
//normal output
Grant the client role
//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 : [
$ grant-subscription-permission
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 |
Get the list of namespaces of a tenant
pulsarctl namespaces list (tenant name)
Get the list of namespaces of a tenant
This command requires tenant admin permissions.
//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
$ list
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 |
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)
This command is used for enabling or disabling messages encryption for a namespace.
This command requires tenant admin and a broker needs the read-write operations of the global zookeeper.
//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 : [
$ messages-encryption
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 |
Get permissions configure data of a namespace (tenant)/(namespace)
pulsarctl namespaces permissions (tenant)/(namespace)
This command is used for getting permissions configure data of a namespace.
This command requires tenant admin permissions.
//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 : [
$ permissions
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 the configuration policies of a namespace
pulsarctl namespaces policies (tenant/namespace)
Get the configuration policies of a namespace
This command requires tenant admin permissions.
//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
$ policies
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 a backlog quota policy from a namespace
pulsarctl namespaces remove-backlog-quota tenant/namespace
Remove a backlog quota policy from a namespace
This command requires tenant admin permissions.
//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
$ remove-backlog-quota
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 config for a namespace, defaulting to broker settings
pulsarctl namespaces remove-topic-auto-creation tenant/namespace
Remove topic auto-creation config for a namespace, defaulting to broker settings
This command requires tenant admin permissions.
//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
$ remove-topic-auto-creation
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 the client role (role-name) of accessing the namespace (namespace-name)
pulsarctl namespaces revoke-permission --role (role-name) (namespace-name)
This command is used for revoking a client role permissions of accessing a namespace.
This command requires tenant admin permissions and broker has read-writer permissions on the zookeeper.
//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 : [
$ revoke-permission
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 |
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>]
This command is used for revoking a client role permissions of accessing a subscription of a namespace.
This command requires tenant admin permissions and broker has read-writer permissions on the zookeeper.
//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 : [
$ revoke-subscription-permission
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 the anti-affinity group for a namespace
pulsarctl namespaces set-anti-affinity-group tenant/namespace
--group (anti-affinity group name)
Set the anti-affinity group for a namespace
This command requires tenant admin permissions.
//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
$ set-anti-affinity-group
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 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>
Set a backlog quota policy for a namespace
This command requires tenant admin permissions.
//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)
$ set-backlog-quota
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 the replicated clusters for a namespace
pulsarctl namespaces set-clusters tenant/namespace --clusters (cluster name)
Set the replicated clusters for a namespace
This command requires tenant admin permissions.
//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]
$ set-clusters
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 the compaction size threshold of the namespace (namespace-name) to (size)
pulsarctl namespaces set-compaction-threshold --size (size) (namespace-name)
This command is used for setting compaction threshold of a namespace.
This command requires super-user permissions and broker has write policies permission.
//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 : [
$ set-compaction-threshold
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 |
Enable or disable deduplication for a namespace
pulsarctl namespaces set-deduplication tenant/namespace (--enable)
Enable or disable deduplication for a namespace
This command requires tenant admin permissions.
//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
$ set-deduplication
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 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)
This command is used for setting the default message dispatch rate of a namespace.
This command requires super-user permissions.
//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 : [
$ set-dispatch-rate
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 |
Enable automatically update schema on a namespace
pulsarctl namespaces set-is-allow-auto-update-schema --enable (namespace-name)
Disable automatically update update schema on a namespace
pulsarctl namespaces set-is-allow-auto-update-schema --disable (namespace-name)
Set the whether to allow auto update schema on a namespace
This command requires tenant admin permissions
$ set-is-allow-auto-update-schema
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 automatically update schema | |
enable | false | enable automatically update schema | |
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 the max consumers per subscription of the namespace (namespace-name) to (size)
pulsarctl namespaces set-max-consumers-per-subscription --size (size) (namespace-name)
This command is used for setting the max consumers per subscription of a namespace.
This command requires super-user permissions and broker has write policies permission.
//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 : [
$ set-max-consumers-per-subscription
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 the max consumers per topic of the namespace (namespace-name) to (size)
pulsarctl namespaces set-max-consumers-per-topic --size (size) (namespace-name)
This command is used for setting the max consumers per topic of a namespace.
This command requires super-user permissions and broker has write policies permission.
//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 : [
$ set-max-consumers-per-topic
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 the max producers per topic of the namespace (namespace-name) to (size)
pulsarctl namespaces set-max-producers-per-topic --size (size) (namespace-name)
This command is used for setting the max producers per topic of a namespace.
This command requires super-user permissions and broker has write policies permission.
//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 : [
$ set-max-producers-per-topic
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 for a namespace
pulsarctl namespaces set-message-ttl tenant/namespace -ttl 10
Set Message TTL for a namespace
This command requires tenant admin permissions.
//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
$ set-message-ttl
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 the offload deletion (duration) of the namespace (namespace-name)
pulsarctl namespaces set-offload-deletion-lag --lag (duration) (namespace-name)
This command is used for setting the offload deletion of a namespace.
This command requires super-user permissions and broker has write policies permission.
//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 : [
$ set-offload-deletion-lag
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 the offload threshold of the namespace (namespace-name) to (size)
pulsarctl namespaces set-offload-threshold --size (size) (namespace-name)
This command is used for setting the offload threshold of a namespace.
This command requires super-user permissions and broker has write policies permission.
//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 : [
$ set-offload-threshold
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 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
Set the persistence policy for a namespace
This command requires tenant admin permissions.
//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
$ set-persistence
Name | Shorthand | Default | Usage |
---|---|---|---|
ack-quorum-size | a | 0 | Number of acks (guaranteed copies) to wait for each entry |
admin-service-url | s | 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 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)
This command is used for setting the default maximum message publish rate of a namespace per second.
This command requires super-user permissions.
//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 : [
$ set-publish-rate
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 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)
This command is used for setting the default replicator message dispatch rate of a namespace.
This command requires super-user permissions.
//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 : [
$ set-replicator-dispatch-rate
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 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
Set the retention policy for a namespace
This command requires tenant admin permissions.
//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
$ set-retention
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 the schema auto-update strategy to (strategy)
pulsarctl namespaces set-schema-autoupdate-strategy --compatibility (strategy) (namespace-name)
This command is used for setting the schema auto-update strategy of a namespace.
This command requires super-user permissions and broker has write policies permission.
//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 : [
$ set-schema-autoupdate-strategy
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 |
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>
This command is used for setting the schema whether open schema validation enforced.
This command requires super-user permissions and broker has write policies permission.
//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 : [
$ set-schema-validation-enforced
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 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)
This command is used for setting the default subscribe rate per consumer of a namespace.
This command requires super-user permissions.
//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 : [
$ set-subscribe-rate
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 the default subscription auth mode (mode) of the namespace (namespace-name)
pulsarctl namespaces set-subscription-auth-mode --mode (mode) (namespace-name)
This command is used for setting the default subscription auth mode of a namespace.
This command requires tenant admin and a broker needs the read-write operations of the global zookeeper.
//normal output
Successfully set the default subscription auth mode of namespace
//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 : [
$ set-subscription-auth-mode
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 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)
This command is used for setting the default subscription message dispatch rate of a namespace.
This command requires super-user permissions.
//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 : [
$ set-subscription-dispatch-rate
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 config for a namespace, overriding broker settings
pulsarctl namespaces set-topic-auto-creation tenant/namespace
--type partitioned
--partitions 2
Set topic auto-creation config for a namespace, overriding broker settings
This command requires tenant admin permissions.
//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
$ set-topic-auto-creation
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 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
Split a namespace-bundle from the current serving broker
This command requires tenant admin permissions.
//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)
$ split-bundle
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 |
Get the list of topics for a namespace
pulsarctl namespaces topics (tenant/namespace)
Get the list of topics for a namespace
This command requires namespace admin permissions.
//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
$ topics
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 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})
Unload a namespace from the current serving broker
This command requires tenant admin permissions.
//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
$ unload
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 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)
This command is used for unsubscribing the specified subscription for all topics of a namespace.
This command requires tenant admin permissions.
//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 : [
$ unsubscribe
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 |
$ ns-isolation-policy
Get broker with namespace-isolation policies attached to it
pulsarctl ns-isolation-policy broker (cluster-name) (broker address)
Get broker with namespace-isolation policies attached to it.
This command requires super-user permissions.
//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
$ broker
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 all brokers with namespace-isolation policies attached to it
pulsarctl ns-isolation-policy brokers (cluster-name)
List all brokers with namespace-isolation policies attached to it.
This command requires super-user permissions.
//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
$ brokers
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 namespace isolation policy of a cluster.
pulsarctl ns-isolation-policy delete (cluster-name) (policy-name)
Delete namespace isolation policy of a cluster.
This command requires super-user permissions.
//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
$ delete
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 namespace isolation policy of a cluster
pulsarctl ns-isolation-policy get (cluster-name) (policy-name)
Get namespace isolation policy of a cluster.
This command requires super-user permissions.
//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
$ get
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 all namespace isolation policies of a cluster.
pulsarctl ns-isolation-policy list (cluster-name)
List all namespace isolation policies of a cluster.
This command requires super-user permissions.
//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
$ list
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 |
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
Create/Update a namespace isolation policy for a cluster.
This command requires super-user permissions.
//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
$ set
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 |
$ packages
Delete a package
pulsarctl packages delete
function://public/default/test@v1
Delete a package
This command requires super-user permissions.
//normal output
The package 'function://public/default/test@v1' deleted successfully
$ delete
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 a package
pulsarctl packages download
function://public/default/test@v1
--path /pulsar/examples/test.jar
Download a package
This command requires super-user permissions.
//normal output
The package 'function://public/default/test@v1' downloaded to path '/pulsar/examples/test.jar' successfully
$ download
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 the metadata of a package
pulsarctl packages get-metadata
function://public/default/test@v1
Get the metadata of a package
This command requires super-user permissions.
//normal output
{
"description":"test",
"contact":"apache pulsar",
"createTime":1,
"modificationTime":1,
"properties":{
"foo":"bar"
}
}
$ get-metadata
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 all the specified type packages under a namespace
pulsarctl packages list
--type function
public/default
List all specified type packages under a specific tenant and namespace
This command requires super-user permissions.
//normal output
+--------------------+
| Package Name |
+--------------------+
| function://public/default/[email protected] |
+--------------------+
$ list
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 all versions of a package
pulsarctl packages list-versions
function://public/default/example
List all versions of a package
This command requires super-user permissions.
//normal output
+--------------------+
| Package Version |
+--------------------+
| function://public/default/[email protected] |
+--------------------+
$ list-versions
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 a package metadata information
pulsarctl packages update-metadata
function://public/default/test@v1
--description hello
Update a package metadata information
This command requires super-user permissions.
//normal output
The metadata of the package 'function://public/default/test@v1' updated successfully
$ update-metadata
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 a package
pulsarctl packages upload
function://public/default/test@v1
--path /pulsar/examples/test.jar
--description test
Upload a package
This command requires super-user permissions.
//normal output
The package 'function://public/default/test@v1' uploaded from path '/pulsar/examples/test.jar' successfully
$ upload
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 |
$ resource-quotas
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)
Get the resource quota for a specified namespace bundle, or default quota if no namespace/bundle is specified.
This command requires super-user permissions.
//normal output
{
"msgRateIn" : 40.0,
"msgRateOut" : 120.0,
"bandwidthIn" : 100000.0,
"bandwidthOut" : 300000.0,
"memory" : 80.0,
"dynamic" : true
}
$ get
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 the specified namespace bundle's resource quota to default value
pulsarctl resource-quotas reset (namespace name) (bundle range)
Reset the specified namespace bundle's resource quota to default value.
This command requires super-user permissions.
//normal output
Reset resource quota successful
$ reset
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 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
Set the resource quota for specified namespace bundle, or default quota if no namespace/bundle specified.
This command requires super-user permissions.
//normal output
Set (default) resource quota successful
$ set
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 |
$ schemas
Delete the latest schema for a topic
pulsarctl schemas delete (topic name)
Delete the latest schema for a topic
This command requires namespace admin permissions.
//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
$ delete
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 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
Get the schema for a topic.
This command requires namespace admin permissions.
//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
$ get
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 | ||
version | 0 | the schema version info |
Update the schema for a topic
pulsarctl schemas upload
(topic name)
--filename (the file path of schema)
Update the schema for a topic
This command requires namespace admin permissions.
//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
$ upload
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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
Get the list of Pulsar IO connector sinks supported by Pulsar cluster
pulsarctl sink available-sinks
Get the list of Pulsar IO connector sinks supported by Pulsar cluster
This command does not need any permission.
//normal output
+---------+----------+-----------+
| Name | Desc | Class |
+----------+----------+-----------+
| sink_name | example sink | aaa.bbb |
+----------+----------+-----------+
$ available-sinks
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 |
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
Create a Pulsar IO sink connector to run in a Pulsar cluster.
This command requires namespace function permissions.
//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
$ create
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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://) | ||
cleanup-subscription | true | Whether delete the subscription when sink is deleted | |
cpu | 0 | The CPU (in cores) that needs to be allocated per sink instance (applicable only to Docker runtime) | |
custom-runtime-options | A string that encodes options to customize the runtime, see docs for configured runtime for details | ||
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) | ||
dead-letter-topic | Name of the dead topic where the failing messages will be sent. | ||
disk | 0 | The disk (in bytes) that need to be allocated per sink instance (applicable only to Docker runtime) | |
input-specs | The map of inputs to custom configuration (as a JSON string) | ||
inputs | i | The sink's input topic or topics (multiple topics can be specified as a comma-separated list) | |
max-redeliver-count | 0 | Maximum number of times that a message will be redelivered before being sent to the dead letter queue | |
name | The sink's name | ||
namespace | The sink's namespace | ||
negative-ack-redelivery-delay-ms | 0 | The negative ack message redelivery delay in milliseconds | |
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-key-ordering | false | Sink consumes and processes messages in key order | |
retain-ordering | false | Sink consumes and sinks messages in order | |
secrets | The map of secretName to an object that encapsulates how the secret is fetched by the underlying secretsprovider | ||
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) | ||
transform-function | Transform function applied before the Sink | ||
transform-function-classname | The transform function class name | ||
transform-function-config | Configuration of the transform function applied before the Sink |
Delete a Pulsar IO sink connector
pulsarctl sink delete
--tenant public
--namespace default
--name (the name of Pulsar Sink)
This command is used for deleting a Pulsar IO sink connector.
This command requires namespace function permissions.
//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
$ delete
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 the information about a Pulsar IO sink connector
pulsarctl sink get
--tenant public
--namespace default
--name (the name of Pulsar Sink)
Get the information about a Pulsar IO sink connector
This command requires namespace function permissions.
//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
$ get
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 the list of all the running Pulsar IO sink connectors
pulsarctl sink list
--tenant public
--namespace default
Get the list of all the running Pulsar IO sink connectors
This command requires namespace function permissions.
//normal output
+--------------------+
| Sink Name |
+--------------------+
| test_sink_name |
+--------------------+
$ list
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 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
Restart sink instance.
This command requires namespace function permissions.
//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
$ restart
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 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
This command is used for starting a stopped sink instance.
This command requires namespace function permissions.
//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
$ start
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 |
Get the current status of a Pulsar Sink
pulsarctl sink status
--tenant public
--namespace default
--name (the name of Pulsar Sink)
Get the current status of a Pulsar Sink.
This command requires namespace function permissions.
//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
$ status
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 |
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
This command is used for stopping sink instance.
This command requires namespace function permissions.
//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
$ stop
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 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
Update a Pulsar IO sink connector.
This command requires namespace function permissions.
//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
$ update
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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" | ||
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://) | ||
cleanup-subscription | true | Whether delete the subscription when sink is deleted | |
cpu | 0 | The CPU (in cores) that needs to be allocated per sink instance (applicable only to Docker runtime) | |
custom-runtime-options | A string that encodes options to customize the runtime, see docs for configured runtime for details | ||
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) | ||
dead-letter-topic | Name of the dead topic where the failing messages will be sent. | ||
disk | 0 | The disk (in bytes) that need to be allocated per sink instance (applicable only to Docker runtime) | |
input-specs | The map of inputs to custom configuration (as a JSON string) | ||
inputs | i | The sink's input topic or topics (multiple topics can be specified as a comma-separated list) | |
max-redeliver-count | 0 | Maximum number of times that a message will be redelivered before being sent to the dead letter queue | |
name | The sink's name | ||
namespace | The sink's namespace | ||
negative-ack-redelivery-delay-ms | 0 | The negative ack message redelivery delay in milliseconds | |
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) | |
ram | 0 | The RAM (in bytes) that need to be allocated per sink instance (applicable only to the process and Docker runtimes) | |
retain-key-ordering | false | Sink consumes and processes messages in key order | |
secrets | The map of secretName to an object that encapsulates how the secret is fetched by the underlying secretsprovider | ||
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) | ||
transform-function | Transform function applied before the Sink | ||
transform-function-classname | The transform function class name | ||
transform-function-config | Configuration of the transform function applied before the Sink | ||
update-auth-data | false | Whether or not to update the auth data |
$ sources
Get the list of Pulsar IO connector sources supported by Pulsar cluster
pulsarctl source available-sources
Get the list of Pulsar IO connector sources supported by Pulsar cluster
This command does not need any permission.
//normal output
+---------+----------+-----------+
| Name | Desc | Class |
+----------+----------+-----------+
| source_name | example source | aaa.bbb |
+----------+----------+-----------+
$ available-sources
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 |
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
Submit a Pulsar IO source connector to run in a Pulsar cluster.
This command requires namespace function permissions.
//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
$ create
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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" | ||
batch-builder | BatchBuilder provides two types of batch construction methods, DEFAULT and KEY_BASED. The default valueis: DEFAULT | ||
batch-source-config | Batch source config key/values | ||
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) | |
custom-runtime-options | A string that encodes options to customize the runtime, see docs for configured runtime for details | ||
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 | ||
producer-config | The custom producer configuration (as a JSON string) | ||
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 | ||
secrets | The map of secretName to an object that encapsulates how the secret is fetched by the underlying secretsprovider | ||
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 a Pulsar IO source connector
pulsarctl source delete
--tenant public
--namespace default
--name (the name of Pulsar Source)
This command is used for deleting a Pulsar IO source connector.
This command requires namespace function permissions.
//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
$ delete
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 |
Gets the information about a Pulsar IO source connector
pulsarctl source get
--tenant public
--namespace default
--name (the name of Pulsar Source)
Gets the information about a Pulsar IO source connector
This command requires namespace function permissions.
//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
$ get
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 all running Pulsar IO source connectors
pulsarctl source list
--tenant public
--namespace default
List all running Pulsar IO source connectors
This command requires namespace function permissions.
//normal output
+--------------------+
| Source Name |
+--------------------+
| test_source_name |
+--------------------+
$ list
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 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
Restart source instance.
This command requires namespace function permissions.
//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
$ restart
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 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
This command is used for starting a stopped source instance.
This command requires namespace function permissions.
//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
$ start
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 |
Check the current status of a Pulsar Source
pulsarctl source status
--tenant public
--namespace default
--name (the name of Pulsar Source)
Check the current status of a Pulsar Source.
This command requires namespace function permissions.
//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
$ status
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 |
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
This command is used for stopping source instance.
This command requires namespace function permissions.
//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
$ stop
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 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
Update a Pulsar IO source connector.
This command requires namespace function permissions.
//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
$ update
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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" | ||
batch-builder | BatchBuilder provides two types of batch construction methods, DEFAULT and KEY_BASED. The default valueis: DEFAULT | ||
batch-source-config | Batch source config key/values | ||
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) | |
custom-runtime-options | A string that encodes options to customize the runtime, see docs for configured runtime for details | ||
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 | ||
producer-config | The custom producer configuration (as a JSON string) | ||
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 | ||
secrets | The map of secretName to an object that encapsulates how the secret is fetched by the underlying secretsprovider | ||
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 |
$ status
Check service(broker or proxy) status
pulsarctl status check
Check service(broker or proxy) status
This command requires super-user permissions.
//normal output
Ok
$ check
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 |
$ subscriptions
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)
This command is used for creating a subscription on a topic.
This command requires tenant admin and namespace produce or consume permissions.
//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
[✖] Invalid short topic name '
//the topic name is not in the format of
[✖] Invalid complete topic name '
//the topic name is not in the format of
[✖] Invalid topic 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 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.
$ create
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 the subscription (subscription-name) of the topic (topic-name)
pulsarctl subscriptions delete (topic-name) (subscription-name)
This command is used for deleting a subscription of a topic.
This command requires tenant admin and namespace consume permissions.
//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
[✖] Invalid short topic name '
//the topic name is not in the format of
[✖] Invalid complete topic name '
//the topic name is not in the format of
[✖] Invalid topic 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 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 : [
$ delete
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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
This command is used for expiring messages that older than given expiry time (in seconds) for a subscription.
This command requires tenant admin and namespace produce or consume permissions.
//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
[✖] Invalid short topic name '
//the topic name is not in the format of
[✖] Invalid complete topic name '
//the topic name is not in the format of
[✖] Invalid topic 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 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 : [
$ expire
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 the given ledgerID an entryID
pulsarctl subscription get-message-by-id --ledger-id (ledger-id) --entry-id (entry-id) (topic-name)
This command is used for getting messages by the given ledgerID and entryID for a subscription.
This command requires tenant admin and namespace produce or consume permissions.
$ get-message-by-id
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 |
ledger-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 all the existing subscriptions of a topic (topic-name)
pulsarctl subscriptions list (topic-name)
This command is used for listing all the existing subscriptions of a topic.
This command requires tenant admin and namespace produce or consume permissions.
//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
[✖] Invalid short topic name '
//the topic name is not in the format of
[✖] Invalid complete topic name '
//the topic name is not in the format of
[✖] Invalid topic 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 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 : [
$ list
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 some messages of a subscription
pulsarctl subscriptions peek --count (n) (topic-name) (subscription-name)
This command is used for peeking some messages of a subscription.
This command requires tenant admin permissions or namespace consumer permissions.
//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
[✖] Invalid short topic name '
//the topic name is not in the format of
[✖] Invalid complete topic name '
//the topic name is not in the format of
[✖] Invalid topic name '
$ peek
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 |
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)
This command is used for resetting the position of a subscription to a position that is closest to the provided timestamp or messageId.
This command requires tenant admin and namespace produce or consume permissions.
//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
[✖] Invalid short topic name '
//the topic name is not in the format of
[✖] Invalid complete topic name '
//the topic name is not in the format of
[✖] Invalid topic 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 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 : [
$ seek
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 (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)
This command is used for skipping messages for a subscription.
This command requires tenant admin and namespace produce or consume permissions.
//normal output
The subscription (subscription-name) skips (n) messages of the topic
//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
[✖] Invalid short topic name '
//the topic name is not in the format of
[✖] Invalid complete topic name '
//the topic name is not in the format of
[✖] Invalid topic 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 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 : [
$ skip
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 |
$ tenants
create a tenant named (tenant-name)
pulsarctl tenants create (tenant-name)
This command is used for creating a new tenant.
This command requires super-user permissions.
//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
$ create
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-roles | r | [] | Allowed admins to access the tenant |
admin-service-url | s | 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 a tenant named (tenant-name)
pulsarctl tenants delete (tenant-name)
This command is used for deleting an existing tenant.
This command requires super-user permissions.
//normal output
Delete tenant
//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
$ delete
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 the configuration of tenant (tenant-name)
pulsarctl tenants get (tenant-name)
This command is used for getting the configuration of a tenant.
This command requires super-user permissions.
//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
$ get
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 all the existing tenants
pulsarctl tenants list
This command is used for listing all the existing tenants.
This command requires super-user permissions.
//normal output
+-------------+
| TENANT NAME |
+-------------+
| public |
| sample |
+-------------+
$ list
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 |
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)
This command is used for updating the configuration of a tenant.
This command requires super-user permissions.
//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
$ update
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-roles | r | [] | Allowed admins to access the tenant |
admin-service-url | s | 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 |
You can use this tool to generate secret key, private/public key, and token.
$ token
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)
Create a token with headers.
pulsarctl token create --secret-key-string (secret-key-string) --subject (subject) -headers kid=kid1,key2=value2
This command is used for create a token string.
This command does not need any permission.
//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
$ create
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 | ||
headers | [] | The headers for a token. e.g. key1=value1,key2=value2 | |
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 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)
This command is used for creating a private and public key pair.
This command does not need any permission.
//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
$ create-key-pair
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 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)
This command is used for creating a secret key.
This command does not need any permission.
//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'
$ create-secret-key
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 |
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)
This command is used for showing the content of a token.
This command does not need any permission.
//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
$ show
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 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)
This command is used for validating a token.
This command does not need any permission.
//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
$ validate
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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. |
$ topics
Get namespace bundle range of a topic (topic-name)
pulsarctl topic bundle-range (topic-name)
This command is used for getting namespace bundle range of a topic (partition).
This command requires super-user permissions.
//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
[✖] Invalid short topic name '
//the topic name is not in the format of
[✖] Invalid complete topic name '
//the topic name is not in the format of
[✖] Invalid topic 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 : [
SCOPE:
non-partitioned topic, a partition of a partitioned topic
$ bundle-range
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 a persistent topic (topic-name)
pulsarctl topic compact (topic-name)
Compact a partition of a partitioned topic
pulsarctl topic compact --partition (index) (topic-name)
This command is used for compacting a persistent topic or a partition of a partitioned topic.
This command is requires tenant admin permissions.
//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
[✖] Invalid short topic name '
//the topic name is not in the format of
[✖] Invalid complete topic name '
//the topic name is not in the format of
[✖] Invalid topic 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 : [
SCOPE:
non-partitioned topic, a partition of a partitioned topic
$ compact
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 |
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)
This command is used for getting compaction status of a topic or a partition of a partitioned topic.
This command requires tenant admin permissions.
//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
[✖] Invalid short topic name '
//the topic name is not in the format of
[✖] Invalid complete topic name '
//the topic name is not in the format of
[✖] Invalid topic 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 : [
SCOPE:
non-partitioned topic, a partition of a partitioned topic
$ compact-status
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 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)
This command is used for creating topic.
This command requires namespace admin permissions.
//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
[✖] Invalid short topic name '
//the topic name is not in the format of
[✖] Invalid complete topic name '
//the topic name is not in the format of
[✖] Invalid topic 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 : [
SCOPE:
non-partitioned topic, partitioned topic
$ create
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 a partitioned topic (topic-name)
pulsarctl topics delete (topic-name)
Delete a non-partitioned topic (topic-name)
pulsarctl topics delete --non-partitioned (topic-name)
This command is used for deleting an existing topic.
This command requires namespace admin permissions.
//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
[✖] Invalid short topic name '
//the topic name is not in the format of
[✖] Invalid complete topic name '
//the topic name is not in the format of
[✖] Invalid topic 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 : [
SCOPE:
non-partitioned topic, partitioned topic
$ delete
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 hte metadata of an exist topic (topic-name) metadata
pulsarctl topics get (topic-name)
This command is used for getting the metadata of an exist topic.
This command requires namespace admin permissions.
//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
[✖] Invalid short topic name '
//the topic name is not in the format of
[✖] Invalid complete topic name '
//the topic name is not in the format of
[✖] Invalid topic 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 : [
SCOPE:
non-partitioned topic, partitioned topic, a partition of a partitioned topic
$ get
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 the backlog quota policy for a topic
pulsarctl topics get-backlog-quotas topic
Get the backlog quota policy for a topic
This command requires tenant admin permissions.
$ get-backlog-quotas
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 the compaction threshold for a topic
pulsarctl topics get-compaction-threshold [topic]
Get the compaction threshold for a topic
This command requires tenant admin permissions.
//normal output
The compaction threshold of the topic (topic-name) is (size) byte(s)
$ get-compaction-threshold
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 the deduplication policy for a topic
pulsarctl topics get-deduplication topic
Get the deduplication policy for a topic
This command requires tenant admin permissions.
//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
[✖] Invalid short topic name '
//the topic name is not in the format of
[✖] Invalid complete topic name '
//the topic name is not in the format of
[✖] Invalid topic 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 : [
$ get-deduplication
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 policy for a topic
pulsarctl topics get-delayed-delivery topic
Get delayed delivery policy for a topic
This command requires tenant admin permissions.
//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
[✖] Invalid short topic name '
//the topic name is not in the format of
[✖] Invalid complete topic name '
//the topic name is not in the format of
[✖] Invalid topic 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 : [
$ get-delayed-delivery
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 message dispatch rate for a topic
pulsarctl topics get-dispatch-rate topic
Get message dispatch rate for a topic
This command requires tenant admin permissions.
//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
[✖] Invalid short topic name '
//the topic name is not in the format of
[✖] Invalid complete topic name '
//the topic name is not in the format of
[✖] Invalid topic 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 : [
$ get-dispatch-rate
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 the inactive topic policies on a topic
pulsarctl topics get-inactive-topic-policies [topic]
Get the inactive topic policies on a topic
This command requires tenant admin permissions.
$ get-inactive-topic-policies
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 number of consumers for a topic
pulsarctl topics get-max-consumers topic
Get max number of consumers for a topic
This command requires tenant admin permissions.
//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
[✖] Invalid short topic name '
//the topic name is not in the format of
[✖] Invalid complete topic name '
//the topic name is not in the format of
[✖] Invalid topic 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 : [
$ get-max-consumers
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 number of producers for a topic
pulsarctl topics get-max-producers topic
Get max number of producers for a topic
This command requires tenant admin permissions.
//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
[✖] Invalid short topic name '
//the topic name is not in the format of
[✖] Invalid complete topic name '
//the topic name is not in the format of
[✖] Invalid topic 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 : [
$ get-max-producers
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 for a topic
pulsarctl topics get-max-unacked-messages-per-consumer topic
Get max unacked messages per consumer for a topic
This command requires tenant admin permissions.
//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
[✖] Invalid short topic name '
//the topic name is not in the format of
[✖] Invalid complete topic name '
//the topic name is not in the format of
[✖] Invalid topic 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 : [
$ get-max-unacked-messages-per-consumer
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 for a topic
pulsarctl topics get-max-unacked-messages-per-subscription topic
Get max unacked messages per subscription for a topic
This command requires tenant admin permissions.
//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
[✖] Invalid short topic name '
//the topic name is not in the format of
[✖] Invalid complete topic name '
//the topic name is not in the format of
[✖] Invalid topic 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 : [
$ get-max-unacked-messages-per-subscription
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 settings of a topic
pulsarctl topics get-message-ttl topic
Get message TTL settings of a topic
This command requires tenant admin permissions.
//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
[✖] Invalid short topic name '
//the topic name is not in the format of
[✖] Invalid complete topic name '
//the topic name is not in the format of
[✖] Invalid topic 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 : [
$ get-message-ttl
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 the permissions of a topic (topic-name)
pulsarctl topic get-permissions (topic-name)
This command is used for getting the permissions of a topic.
This command requires namespace admin permissions.
//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
[✖] Invalid short topic name '
//the topic name is not in the format of
[✖] Invalid complete topic name '
//the topic name is not in the format of
[✖] Invalid topic 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 : [
SCOPE:
non-partitioned topic, a partition of a partitioned topic, partitioned topic
$ get-permissions
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 for a topic
pulsarctl topic get-persistence (topic-name)
Get persistence for a topic
This command requires namespace admin persistence.
//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
[✖] Invalid short topic name '
//the topic name is not in the format of
[✖] Invalid complete topic name '
//the topic name is not in the format of
[✖] Invalid topic 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 : [
$ get-persistence
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 message publish rate for a topic
pulsarctl topics get-publish-rate topic
Get message publish rate for a topic
This command requires tenant admin permissions.
//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
[✖] Invalid short topic name '
//the topic name is not in the format of
[✖] Invalid complete topic name '
//the topic name is not in the format of
[✖] Invalid topic name '
//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 : [
$ get-publish-rate
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 the retention policy for a topic
pulsarctl topics get-retention tenant/namespace/topic
Get the retention policy for a topic
This command requires tenant admin permissions.
//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
$ get-retention
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 to a client on a single topic (topic-name)
pulsarctl topic grant-permissions --role (role) --actions (action-1) --actions (action-2) (topic-name)
This command is used for granting permissions to a client role on a topic.
This command requires namespace admin permissions.
//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
[✖] Invalid short topic name '
//the topic name is not in the format of
[✖] Invalid complete topic name '
//the topic name is not in the format of
[✖] Invalid topic 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 : [
SCOPE:
non-partitioned topic, a partition of a partitioned topic, partitioned topic
$ grant-permissions
Name | Shorthand | Default | Usage |
---|---|---|---|
actions | [] | Actions to be granted (produce,consume,sources,sinks,functions,packages) | |
admin-service-url | s | 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 |
Get the internal info of a topic
pulsarctl topic internal-info <topic-name>
This command is used for getting the internal info of a topic which has messages or subscriptions.
This command requires tenant admin permissions.
//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
[✖] Invalid short topic name '
//the topic name is not in the format of
[✖] Invalid complete topic name '
//the topic name is not in the format of
[✖] Invalid topic 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 : [
SCOPE:
non-partitioned topic, a partition of a partitioned topic
$ internal-info
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 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)
This command is used for getting the internal stats for a non-partitioned topic or a partition of a partitioned topic.
This command requires namespace admin permissions.
//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
[✖] Invalid short topic name '
//the topic name is not in the format of
[✖] Invalid complete topic name '
//the topic name is not in the format of
[✖] Invalid topic 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 : [
SCOPE:
non-partitioned topic, a partition of a partitioned topic, partitioned topic
$ internal-stats
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 |
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)
This command is used for getting the last message id of a topic (partition).
This command requires tenant admin permissions.
//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
[✖] Invalid short topic name '
//the topic name is not in the format of
[✖] Invalid complete topic name '
//the topic name is not in the format of
[✖] Invalid topic 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 : [
SCOPE:
non-partitioned topic, a partition of a partitioned topic
$ last-message-id
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 all exist topics under the namespace(tenant/namespace)
pulsarctl topics list (tenant/namespace)
This command is used for listing all exist topics under the specified namespace.
This command requires admin permissions.
//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
$ list
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 the owner broker of the topic (topic-name)
pulsarctl topic lookup (topic-name)
This command is used for looking up the owner broker of a topic.
This command does not require permissions.
//
{
"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
[✖] Invalid short topic name '
//the topic name is not in the format of
[✖] Invalid complete topic name '
//the topic name is not in the format of
[✖] Invalid topic 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 : [
SCOPE:
non-partitioned topic, a partition of a partitioned topic, partitioned topic
$ lookup
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 |
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)
This command is used for triggering offloading the messages of a topic to a long-term storage (e.g. Amazon S3)
This command requires tenant admin permissions.
//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
[✖] Invalid short topic name '
//the topic name is not in the format of
[✖] Invalid complete topic name '
//the topic name is not in the format of
[✖] Invalid topic 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 : [
SCOPE:
non-partitioned topic, a partition of a partitioned topic
$ offload
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 |
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)
This command is used for checking the status of offloading data from a persistent topic to a long-term storage.
This command requires tenant admin permissions.
//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
[✖] Invalid short topic name '
//the topic name is not in the format of
[✖] Invalid complete topic name '
//the topic name is not in the format of
[✖] Invalid topic 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 : [
SCOPE:
non-partitioned topic, a partition of a partitioned topic
$ offload-status
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 a backlog quota policy from a topic
pulsarctl topics remove-backlog-quota topic -t <destination_storage|message_age>
Remove a backlog quota policy from a topic
This command requires tenant admin permissions.
//normal output
Remove backlog quota successfully for [topic]
$ remove-backlog-quota
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 the compaction threshold for a topic
pulsarctl topics remove-compaction-threshold topic
Remove the compaction threshold for a topic
This command requires tenant admin permissions.
//normal output
Successfully remove compaction threshold for topic (topic-name)
$ remove-compaction-threshold
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 the deduplication policy for a topic
pulsarctl topics remove-deduplication topic
Remove the deduplication policy for a topic
This command requires tenant admin permissions.
//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
[✖] Invalid short topic name '
//the topic name is not in the format of
[✖] Invalid complete topic name '
//the topic name is not in the format of
[✖] Invalid topic 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 : [
$ remove-deduplication
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 policy for a topic
pulsarctl topics remove-delayed-delivery topic
Remove delayed delivery policy for a topic
This command requires tenant admin permissions.
//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
[✖] Invalid short topic name '
//the topic name is not in the format of
[✖] Invalid complete topic name '
//the topic name is not in the format of
[✖] Invalid topic 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 : [
$ remove-delayed-delivery
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 dispatch rate for a topic
pulsarctl topics remove-dispatch-rate topic
Remove message dispatch rate for a topic
This command requires tenant admin permissions.
//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
[✖] Invalid short topic name '
//the topic name is not in the format of
[✖] Invalid complete topic name '
//the topic name is not in the format of
[✖] Invalid topic 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 : [
$ remove-dispatch-rate
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 dispatch rate for a topic
pulsarctl topics remove-dispatch-rate topic
Remove message dispatch rate for a topic
This command requires tenant admin permissions.
//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
[✖] Invalid short topic name '
//the topic name is not in the format of
[✖] Invalid complete topic name '
//the topic name is not in the format of
[✖] Invalid topic 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 : [
$ remove-dispatch-rate
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 from a topic
pulsarctl topics remove-inactive-topic-policies [topic]
Remove inactive topic policies from a topic
This command requires tenant admin permissions.
$ remove-inactive-topic-policies
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 number of consumers for a topic
pulsarctl topics remove-max-consumers topic
Remove max number of consumers for a topic
This command requires tenant admin permissions.
//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
[✖] Invalid short topic name '
//the topic name is not in the format of
[✖] Invalid complete topic name '
//the topic name is not in the format of
[✖] Invalid topic 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 : [
$ remove-max-consumers
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 number of producers for a topic
pulsarctl topics remove-max-producers topic
Remove max number of producers for a topic
This command requires tenant admin permissions.
//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
[✖] Invalid short topic name '
//the topic name is not in the format of
[✖] Invalid complete topic name '
//the topic name is not in the format of
[✖] Invalid topic 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 : [
$ remove-max-producers
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 for a topic
pulsarctl topics remove-max-unacked-messages-per-consumer topic
Remove max unacked messages per consumer for a topic
This command requires tenant admin permissions.
//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
[✖] Invalid short topic name '
//the topic name is not in the format of
[✖] Invalid complete topic name '
//the topic name is not in the format of
[✖] Invalid topic 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 : [
$ remove-max-unacked-messages-per-consumer
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 for a topic
pulsarctl topics remove-max-unacked-messages-per-subscription topic
Remove max unacked messages per subscription for a topic
This command requires tenant admin permissions.
//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
[✖] Invalid short topic name '
//the topic name is not in the format of
[✖] Invalid complete topic name '
//the topic name is not in the format of
[✖] Invalid topic 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 : [
$ remove-max-unacked-messages-per-subscription
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 for a topic
pulsarctl topics remove-message-ttl topic
Remove Message TTL for a topic
This command requires tenant admin permissions.
//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
[✖] Invalid short topic name '
//the topic name is not in the format of
[✖] Invalid complete topic name '
//the topic name is not in the format of
[✖] Invalid topic 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 : [
$ remove-message-ttl
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 for a topic
pulsarctl topics remove-persistence topic
Remove persistence for a topic
This command requires tenant admin permissions.
//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
[✖] Invalid short topic name '
//the topic name is not in the format of
[✖] Invalid complete topic name '
//the topic name is not in the format of
[✖] Invalid topic 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 : [
$ remove-persistence
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 publish rate for a topic
pulsarctl topics remove-publish-rate topic
Remove message publish rate for a topic
This command requires tenant admin permissions.
//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
[✖] Invalid short topic name '
//the topic name is not in the format of
[✖] Invalid complete topic name '
//the topic name is not in the format of
[✖] Invalid topic name '
//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 : [
$ remove-publish-rate
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 the retention policy for a topic
pulsarctl topics remove-retention tenant/namespace/topic
Remove the retention policy for a topic
This command requires tenant admin permissions.
//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
$ remove-retention
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 of a topic (topic-name)
pulsarctl topic revoke-permissions --role (role) (topic-name)
This command is used for revoking a client role permissions on a topic.
This command requires namespace admin permissions.
//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
[✖] Invalid short topic name '
//the topic name is not in the format of
[✖] Invalid complete topic name '
//the topic name is not in the format of
[✖] Invalid topic 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 : [
SCOPE:
non-partitioned topic, a partition of a partitioned topic, partitioned topic
$ revoke-permissions
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 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>
Set a backlog quota policy for a topic
This command requires tenant admin permissions.
//normal output
Set backlog quota successfully for [topic]
$ set-backlog-quota
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 the compaction threshold for a topic
pulsarctl topics set-compaction-threshold topic --threshold 3T
Set the compaction threshold for a topic
This command requires tenant admin permissions.
//normal output
Successfully set compaction threshold to (size) for topic (topic-name)
$ set-compaction-threshold
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 the deduplication policy for a topic
pulsarctl topics set-deduplication topic -e
Set the deduplication policy for a topic
This command requires tenant admin permissions.
//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
[✖] Invalid short topic name '
//the topic name is not in the format of
[✖] Invalid complete topic name '
//the topic name is not in the format of
[✖] Invalid topic 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 : [
$ set-deduplication
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 policy for a topic
pulsarctl topics set-delayed-delivery topic -t 10s -e
Set delayed delivery policy for a topic
This command requires tenant admin permissions.
//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
[✖] Invalid short topic name '
//the topic name is not in the format of
[✖] Invalid complete topic name '
//the topic name is not in the format of
[✖] Invalid topic 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 : [
$ set-delayed-delivery
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 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
Set message dispatch rate for a topic
This command requires tenant admin permissions.
//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
[✖] Invalid short topic name '
//the topic name is not in the format of
[✖] Invalid complete topic name '
//the topic name is not in the format of
[✖] Invalid topic 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 : [
$ set-dispatch-rate
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 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
Set message dispatch rate for a topic
This command requires tenant admin permissions.
//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
[✖] Invalid short topic name '
//the topic name is not in the format of
[✖] Invalid complete topic name '
//the topic name is not in the format of
[✖] Invalid topic 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 : [
$ set-dispatch-rate
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 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
Set the inactive topic policies on a topic
This command requires tenant admin permissions.
$ set-inactive-topic-policies
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 number of consumers for a topic
pulsarctl topics set-max-consumers topic -c 10
Set max number of consumers for a topic
This command requires tenant admin permissions.
//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
[✖] Invalid short topic name '
//the topic name is not in the format of
[✖] Invalid complete topic name '
//the topic name is not in the format of
[✖] Invalid topic 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 : [
$ set-max-consumers
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 number of producers for a topic
pulsarctl topics set-max-producers topic -p 10
Set max number of producers for a topic
This command requires tenant admin permissions.
//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
[✖] Invalid short topic name '
//the topic name is not in the format of
[✖] Invalid complete topic name '
//the topic name is not in the format of
[✖] Invalid topic 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 : [
$ set-max-producers
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 for a topic
pulsarctl topics set-max-unacked-messages-per-consumer topic -m 10
Set max unacked messages per consumer for a topic
This command requires tenant admin permissions.
//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
[✖] Invalid short topic name '
//the topic name is not in the format of
[✖] Invalid complete topic name '
//the topic name is not in the format of
[✖] Invalid topic 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 : [
$ set-max-unacked-messages-per-consumer
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 for a topic
pulsarctl topics set-max-unacked-messages-per-subscription topic -m 10
Set max unacked messages per subscription for a topic
This command requires tenant admin permissions.
//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
[✖] Invalid short topic name '
//the topic name is not in the format of
[✖] Invalid complete topic name '
//the topic name is not in the format of
[✖] Invalid topic 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 : [
$ set-max-unacked-messages-per-subscription
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 for a topic
pulsarctl topics set-message-ttl topic -t 10
Set Message TTL for a topic
This command requires tenant admin permissions.
//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
[✖] Invalid short topic name '
//the topic name is not in the format of
[✖] Invalid complete topic name '
//the topic name is not in the format of
[✖] Invalid topic 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 : [
$ set-message-ttl
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 for a topic
pulsarctl topics set-persistence topic -e 4 -w 3 -a 2 -r 1.0
Set persistence for a topic
This command requires tenant admin permissions.
//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
[✖] Invalid short topic name '
//the topic name is not in the format of
[✖] Invalid complete topic name '
//the topic name is not in the format of
[✖] Invalid topic 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 : [
$ set-persistence
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 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
Set message publish rate for a topic
This command requires tenant admin permissions.
//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
[✖] Invalid short topic name '
//the topic name is not in the format of
[✖] Invalid complete topic name '
//the topic name is not in the format of
[✖] Invalid topic name '
//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 : [
$ set-publish-rate
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 the retention policy for a topic
pulsarctl topics set-retention tenant/namespace/topic --time 100m --size 1G
Set the retention policy for a topic
This command requires tenant admin permissions.
//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
$ set-retention
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 |
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)
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)
This command requires namespace admin permissions.
//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
[✖] Invalid short topic name '
//the topic name is not in the format of
[✖] Invalid complete topic name '
//the topic name is not in the format of
[✖] Invalid topic 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 : [
SCOPE:
non-partitioned topic, a partition of a partitioned topic, partitioned topic
$ stats
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 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)
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.
This command requires tenant admin permissions.
//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
[✖] Invalid short topic name '
//the topic name is not in the format of
[✖] Invalid complete topic name '
//the topic name is not in the format of
[✖] Invalid topic 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 : [
SCOPE:
non-partitioned topic, a partition of a partitioned topic
$ terminate
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 a topic (topic-name)
pulsarctl topic unload (topic-name)
This command is used for unloading a topic.
This command requires super-user permissions.
//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
[✖] Invalid short topic name '
//the topic name is not in the format of
[✖] Invalid complete topic name '
//the topic name is not in the format of
[✖] Invalid topic 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 : [
SCOPE:
non-partitioned topic, a partition of a partitioned topic
$ unload
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 |
pulsarctl topics update (topic-name) (partition-num)
This command is used for updating the partition number of an exist topic.
This command requires namespace admin permissions.
//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
[✖] Invalid short topic name '
//the topic name is not in the format of
[✖] Invalid complete topic name '
//the topic name is not in the format of
[✖] Invalid topic 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 : [
SCOPE:
partitioned topic
$ update
Name | Shorthand | Default | Usage |
---|---|---|---|
admin-service-url | s | 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 |
Commands for interacting with Pulsar as a client (producing, consuming messages)
$ client [command]
Consume messages from a Pulsar topic.
This command allows you to consume messages from a specified Pulsar topic with various
options to control the subscription behavior, message processing, and display format.
Examples: // Consume messages from a topic with a specific subscription name
snctl pulsar client consume --topic persistent://public/default/my-topic --subscription-name my-sub
// Consume only 10 messages from a topic
snctl pulsar client consume --topic persistent://public/default/my-topic --subscription-name my-sub --num-messages 10
// Consume messages from the earliest position in the topic
snctl pulsar client consume --topic persistent://public/default/my-topic --subscription-name my-sub --initial-position earliest
// Consume messages with a shared subscription type
snctl pulsar client consume --topic persistent://public/default/my-topic --subscription-name my-sub --subscription-type shared
$ consume [options]
Name | Shorthand | Default | Usage |
---|---|---|---|
dlq-topic | Dead letter queue topic | ||
hide-payload | false | Hide message payload | |
initial-position | latest | Initial position: latest, earliest | |
max-redeliver-count | 0 | Maximum redelivery count for dead letter queue (0 to disable) | |
num-messages | 0 | Number of messages to consume (0 for unlimited) | |
read-compacted | false | Read compacted topic | |
receiver-queue-size | 1000 | Size of the consumer receive queue | |
regex | false | Treat the topic as a regex pattern | |
schema | Schema type: string, json, avro, protobuf | ||
show-properties | false | Show message properties | |
subscription-mode | durable | Subscription mode: durable, non-durable | |
subscription-name | Subscription name | ||
subscription-type | exclusive | Subscription type: exclusive, shared, failover, key_shared | |
timeout | 30s | Timeout for consuming messages | |
topic | Topic to consume from |
Produce messages to a Pulsar topic.
This command allows you to produce messages to a specified Pulsar topic with various
options to control message content, keys, properties, and production behavior.
Examples: // Produce a single message to a topic
snctl pulsar client produce --topic persistent://public/default/my-topic --messages "Hello Pulsar"
// Produce multiple messages to a topic
snctl pulsar client produce --topic persistent://public/default/my-topic --messages "msg1,msg2,msg3"
// Produce messages with a key
snctl pulsar client produce --topic persistent://public/default/my-topic --messages "Hello" --key "my-key"
// Produce messages with properties
snctl pulsar client produce --topic persistent://public/default/my-topic --messages "Hello" --properties "key1=value1,key2=value2"
// Produce messages from a file
snctl pulsar client produce --topic persistent://public/default/my-topic --message-files /path/to/message.txt
// Read messages from stdin
echo "Hello from stdin" | snctl pulsar client produce --topic persistent://public/default/my-topic --read-stdin
$ produce [options]
Name | Shorthand | Default | Usage |
---|---|---|---|
chunking-allowed | false | Enable chunking of messages | |
disable-batching | false | Disable batching of messages | |
disable-replication | false | Disable message replication | |
key | Message key | ||
key-file | Path to file containing message key | ||
message-files | [] | Path to file(s) containing message content | |
messages | [] | Message(s) to send, separated by the separator character | |
num-times | 1 | Number of times to produce the same messages | |
properties | [] | Message properties (key=value,...) | |
publish-rate | 0 | Messages/second publish rate limit (0 for unlimited) | |
read-stdin | false | Read message from stdin | |
separator | , | Character to split messages and properties | |
topic | Topic to produce to |
$ context
Name | Shorthand | Default | Usage |
---|---|---|---|
as-service-account | Perform this operation as the specified service account | ||
pulsar-cluster | If present, override the pulsar-cluster scope for this CLI request in pulsar subcommands | ||
pulsar-instance | If present, override the pulsar-instance scope for this CLI request in pulsar subcommands | ||
use-service-account | false | Interactively select a service account to perform this operation |
Add an external Pulsar service with token authentication
snctl context add-external my-external-pulsar --service-type pulsar \
--web-service-url http://my-pulsar-host:8080 \
--token my-jwt-token
Add an external Kafka service with SASL/PLAIN authentication
snctl context add-external my-external-kafka --service-type kafka \
--kafka-service-url my-kafka-host:9092 \
--kafka-auth-type sasl_ssl \
--kafka-auth-mechanism PLAIN \
--kafka-auth-user admin \
--kafka-auth-pass password
Add an external Pulsar or Kafka service context to your configuration.
This command allows you to configure external Pulsar
or Kafka services so you can use them with the CLI tools. You can specify
connection details and authentication parameters for your external service.
$ add-external [name]
Name | Shorthand | Default | Usage |
---|---|---|---|
auth-params | Authentication parameters for Pulsar | ||
auth-plugin | Authentication plugin for Pulsar | ||
kafka-auth-mechanism | SASL mechanism (PLAIN, SCRAM-SHA-256, SCRAM-SHA-512) | ||
kafka-auth-pass | Password for Kafka authentication | ||
kafka-auth-type | Authentication type for Kafka (none, sasl_plaintext, sasl_ssl, ssl) | ||
kafka-auth-user | Username for Kafka authentication | ||
kafka-schema-registry-auth-pass | Password for Kafka Schema Registry authentication | ||
kafka-schema-registry-auth-user | Username for Kafka Schema Registry authentication | ||
kafka-schema-registry-url | URL for the Kafka Schema Registry | ||
kafka-service-url | The Kafka bootstrap servers URL | ||
kafka-tls-allow-insecure | false | Allow insecure TLS connection for Kafka | |
kafka-tls-ca-path | Path to the CA certificate file for Kafka | ||
kafka-tls-cert-file | Path to the TLS certificate file for Kafka | ||
kafka-tls-key-file | Path to the TLS key file for Kafka | ||
service-type | Type of service (pulsar or kafka) | ||
tls-allow-insecure | false | Allow insecure TLS connection | |
tls-cert-file | Path to the TLS certificate file | ||
tls-enable-hostname-verification | false | Enable TLS hostname verification | |
tls-key-file | Path to the TLS key file | ||
tls-trust-cert-path | Path to the CA certificate file | ||
token | Authentication token for Pulsar | ||
token-file | Authentication token file for Pulsar | ||
web-service-url | The admin web service URL for Pulsar |
Show the current service context
snctl context current
Display the current service context.
This command shows the currently active service context, which may be:
A StreamNative Cloud Pulsar instance and cluster
An external Pulsar service
An external Kafka service
$ current
List all configured external contexts
snctl context list-external
List all configured external Pulsar and Kafka service contexts.
This command displays all external service contexts that have been added
to your configuration, showing their names, types, and connection details.
$ list-external
Force refresh the authentication token for the current Pulsar configuration. This is primarily for debugging purposes.
$ refresh-token
Remove an external context
snctl context remove-external my-external-pulsar
Remove an external Pulsar or Kafka service context from your configuration.
This command removes a previously configured external service context from
your configuration. If this context is currently in use, you will need to
select another context after removing it.
$ remove-external [name]
Update an external Pulsar service with a new token
snctl context update-external my-external-pulsar --token new-jwt-token
Update an external Kafka service with new authentication credentials
snctl context update-external my-external-kafka \
--kafka-auth-user new-admin \
--kafka-auth-pass new-password
Update the configuration of an existing external Pulsar or Kafka service context.
This command allows you to modify the connection details and authentication
parameters for a previously configured external service. Only the specified
parameters will be updated; others will remain unchanged.
$ update-external [name]
Name | Shorthand | Default | Usage |
---|---|---|---|
auth-params | Authentication parameters for Pulsar | ||
auth-plugin | Authentication plugin for Pulsar | ||
kafka-auth-mechanism | SASL mechanism (PLAIN, SCRAM-SHA-256, SCRAM-SHA-512) | ||
kafka-auth-pass | Password for Kafka authentication | ||
kafka-auth-type | Authentication type for Kafka (none, sasl_plaintext, sasl_ssl, ssl) | ||
kafka-auth-user | Username for Kafka authentication | ||
kafka-schema-registry-auth-pass | Password for Kafka Schema Registry authentication | ||
kafka-schema-registry-auth-user | Username for Kafka Schema Registry authentication | ||
kafka-schema-registry-url | URL for the Kafka Schema Registry | ||
kafka-service-url | The Kafka bootstrap servers URL | ||
kafka-tls-allow-insecure | false | Allow insecure TLS connection for Kafka | |
kafka-tls-ca-path | Path to the CA certificate file for Kafka | ||
kafka-tls-cert-file | Path to the TLS certificate file for Kafka | ||
kafka-tls-key-file | Path to the TLS key file for Kafka | ||
service-type | Type of service (pulsar or kafka) | ||
tls-allow-insecure | false | Allow insecure TLS connection | |
tls-cert-file | Path to the TLS certificate file | ||
tls-enable-hostname-verification | false | Enable TLS hostname verification | |
tls-key-file | Path to the TLS key file | ||
tls-trust-cert-path | Path to the CA certificate file | ||
token | Authentication token for Pulsar | ||
token-file | Authentication token file for Pulsar | ||
web-service-url | The admin web service URL for Pulsar |
Interactively select a Pulsar instance and cluster with fuzzy finder
snctl context use
Use legacy selection mode with numbered options
snctl context use --legacy-mode
Directly select a specific instance and cluster
snctl context use --pulsar-instance=my-instance --pulsar-cluster=my-cluster
Select or change the current service context.
This command allows you to interactively select a Pulsar instance and cluster to use
with Pulsar commands. It updates your configuration so you don't need to specify
these values with each command.
By default, this command uses a fuzzy-finder interface for selecting instances and clusters.
You can also directly provide instance and cluster names to skip the interactive mode.
$ use [--pulsar-instance=INSTANCE] [--pulsar-cluster=CLUSTER]
Name | Shorthand | Default | Usage |
---|---|---|---|
legacy-mode | false | Use legacy number selection mode instead of fuzzy finder | |
non-interactive | false | Run in non-interactive mode, requires both instance and cluster flags |
Switch to a previously configured external context
snctl context use-external my-external-pulsar
List all external contexts first, then choose one
snctl context list-external
snctl context use-external my-external-kafka
Select or change to an external Pulsar or Kafka service context.
This command switches your current context to one of your configured external
services so you can use it with the CLI tools. After switching, commands like
'snctl pulsar' or 'snctl kafka' will operate against this external service.
$ use-external [name]
StreamNative Cloud MCP Server provides resources and tools for AI agents
to interact with StreamNative Cloud resources and services.
$ mcp
Name | Shorthand | Default | Usage |
---|---|---|---|
as-service-account | Perform this operation as the specified service account | ||
enable-command-logging | false | When enabled, the server will log all command requests and responses to the log file | |
features | [] | Features to enable, defaults to all |
|
log-file | Path to log file | ||
pulsar-cluster | If present, override the pulsar-cluster scope for this CLI request in pulsar subcommands | ||
pulsar-instance | If present, override the pulsar-instance scope for this CLI request in pulsar subcommands | ||
read-only | r | false | Read-only mode |
use-service-account | false | Interactively select a service account to perform this operation |
Start a server that communicates via standard input/output streams using JSON-RPC messages.
$ stdio