set
Use this command to set an object's configuration value on the Apache Pulsar cluster to which you are connected.
Synopsis
set <SetCommandArg> [SetCommandArg Options]
set bookie
set broker
set broker <Cluster> dynamic-config <ConfigParameterName> <ConfigValue>
set broker <Cluster> resource-quota msg-rate-in <Value> msg-rate-out <Value> memory <Value> bandwidth-out <Value> bandwidth-in <Value> [namespace <Instance/Cluster/Tenant/Namespace> bundle <StartBoundry_EndBoundry>] dynamic <true/false>
set broker <Cluster> dynamic-config <ConfigParameterName> <ConfigValue>
/> set broker localhost:8080 dynamic-config allowAutoTopicCreation false
set broker <Cluster> resource-quota msg-rate-in <Value> msg-rate-out <Value> memory <Value> bandwidth-out <Value> bandwidth-in <Value> [namespace <Instance/Cluster/Tenant/Namespace> bundle <StartBoundry_EndBoundry>] [dynamic <true/false>]
/> set broker localhost:8080 resource-quota msg-rate-in 3000 msg-rate-out 3000 memory 128 bandwidth-out 10000 bandwidth-in 10000
/> set broker localhost:8080 resource-quota msg-rate-in 2000 msg-rate-out 2000 memory 128 bandwidth-out 10000 bandwidth-in 10000 dynamic true
/> set broker localhost:8080 resource-quota msg-rate-in 5000 msg-rate-out 5000 memory 128 bandwidth-out 15000 bandwidth-in 15000 namespace /instance1/cluster1/tenant1/namespace1 bundle 0x00000000_0x40000000
set cluster
set cluster <Cluster> [in <Cluster>] failure-domain <Domain> [broker <BrokerList>]
set cluster <Cluster> [in <Cluster>] namespace-isolation-policy <Policy> type <failoverPolicyType> min-limit <Integer> usage-threshold <Integer> namespaces <namespace-list> primary <BrokerList> [secondary <BrokerList>]
set cluster <Cluster> [in <Cluster>] peer-cluster <ClusterList>
set cluster <Cluster> [in <Cluster>] resource-group <GroupName> [dispatch-bytes <Integer>] [dispatch-messages <Integer>] [publish-bytes <Integer>] [publish-messages <Integer>]
set cluster <Cluster> [in <Cluster>] [allow-insecure-connection true|false] [auth-plugin <Plugin>] [auth-parameters <Parameters>] [broker-client-certificate <Filename>] [broker-client-key <Filename>] [broker-client-tls true|false] [broker-client-tls-enable-keystore true|false] [broker-client-tls-keystore <Keystore>] [broker-client-tls-keystore-password <Password>] [broker-client-tls-keystore-type JKS|PKCS12] [broker-client-tls-truststore <Truststore>] [broker-client-tls-truststore-password <Password>] [broker-client-tls-truststore-type JKS|PKCS12] [broker-client-trust-certificate <Filename>] [broker-url <URL>] [broker-secure-url <URL>] [listener <String>] [proxy-protocol <SNI>] [proxy-url <URL>] [secure-url <URL>] [url <URL>]
set cluster <Cluster> resource-group <GroupName> [dispatch-bytes <Int>] [dispatch-messages <Int>] [publish-bytes <Int>] [publish-messages <Int>]
/> set cluster /instance1/cluster1 failure-domain domain1
/> set cluster /instance1/cluster1 failure-domain domain1 broker broker1:8623,broker2:8723
- <Namespaces> is a comma-separated list of plain namespace names, e.g. not including the /instance/cluster/ prefix.
- <Brokers> is a comma-separated list of broker host:port entries.
- Pulsar currently only supports the <FailoverPolicyType> value of min_available.
set cluster /instance1/cluster1 namespace-isolation-policy policy1 type min_available min-limit 300 usage-threshold 600 namespaces namespace1,namespace2 primary localhost:8080
set cluster /instance1/cluster1 namespace-isolation-policy policy1 type min_available min-limit 300 usage-threshold 600 namespaces namespace1,namespace2 primary broker1:8623 secondary broker2:8723
- <Clusters> is a comma-separated list of cluster paths, e.g. /instance/cluster
set cluster /instance1/cluster1 clusters /instance1/cluster2,/instance1/cluster3
set cluster /instance1/cluster1 resource-group rg1 dispatch-bytes 10000 publish-bytes 10000
set namespace
/> set namespace /instance1/cluster1/tenant1/namespace1 permissions admin-03 actions produce
/> set namespace /instance1/cluster1/tenant1/namespace1 message-ttl 1000
/instance1/cluster1/tenant1/namespace1> set namespace . replication-cluster /instance1/cluster2
/instance1/cluster1/tenant1/namespace1> set namespace . dedeuplication enable
Set Namespace Options
anti-affinity-group <AntiAffinityName>
auto-subscription-creation <enable|disable>
auto-topic-creation type non-partitioned [create <enable|disable>]
auto-topic-creation type partitioned num-partitions <Int> [create <enable|disable>]
auto-update-schema <enable|disable>
backlog-quota <SizeLimit> policy <PolicyName> [type <QuotaType> limit_time <Int>]
-
Policy Name Options:
producer_request_hold
producer_exception
consumer_backlog_eviction
-
Quota Types:
destination_storage
message_age
-
bookie-affinity-group primary <Group Name> secondary <Group Name>
compaction-threshold <Size>
deduplication <enable|disable>
deduplication-snapshot-interval <Seconds>
delayed-delivery [delay <enable|disable>] [time <Seconds>]
dispatch-rate [bytes <Int>] [seconds <Int>] [messages <Int>] [relative-to-publish-rate <true|false>]
encryption-required <enable|disable>
inactive-topic-policies [delete <enable|disable>] [max-inactive-duration <Seconds>] [mode <Mode>]
- Modes:
delete_when_no_subscriptions
delete_when_subscriptions_caught_up']
- Modes:
max-consumers-per-subscription <Int>
max-consumers-per-topic <Int>
max-producers-per-topic <Int>
max-subscriptions-per-topic <Int>
max-topics <Intd>
max-unacked-messages-per-consumer <Intd>
max-unacked-messages-per-subscription <Intd>
message-ttl <Seconds>
offload-deletion-lag <Size>
offload-policies driver <Driver> bucket <BucketName> [aws-id <String>] [aws-secret <String>] [directory <DirectoryPath>] [endpoint <String>] [file-system-uri <URI>] [file-system-profile-path <Path>] [max-block-size <Int>] [offload-after-elapsed <Int>] [offload-after-threshold <Int>] [offloaded-read-priority <Read Priority>] [read-buffer-size <Int>] [region <String>] [s3-role <RoleName>] [s3-session-name <SessionName>]
- Read Priority values:
TIERED_STORAGE_FIRST
BOOKKEEPER_FIRST
- Read Priority values:
offload-threshold <Size>
permissions <Role> actions <Actions>
Actions is a comma-separated list containing one or more of the following values:
produce
consume
sources
sinks
functions
packages
persistence persistence [bookkeeper-ack-quorum <Int>] [bookkeeper-ensemble <Int>] [bookkeeper-write-quorum <Int> ml-mark-delete-max-rate <Float>]
properties <PropertyList<
PropertyList is a comma-separated list of items, each item of the form
<Name>=<Value>
.publish-rate [byte-publish-rate <Int>] [msg-publish-rate <Int>]
replication-cluster <Cluster>
replicator-dispatch-rate [bytes <Int>] [seconds <Int>] [messages <Int>] [relative-to-publish-rate <true|false>]
resource-group <GroupName>
retention size <Megabytes> time <Minutes>
schema-compatibility-strategy <Compatibility>
Compatibility is one of the values:
FULL
BACKWARD
FORWARD
UNDEFINED
BACKWARD_TRANSITIVE
FORWARD_TRANSITIVE
FULL_TRANSITIVE
ALWAYS_COMPATIBLE
ALWAYS_INCOMPATIBLE
schema-validation-enforce <enable|disable>
split-bundle <StartBoundry_EndBoundry> [unload <Value>]
subscribe-rate [rate-per-consumer <Int>] [rate-period-seconds <Int>]
subscription-auth-mode <None|Prefix>
subscription-dispatch-rate [bytes <Int>] [seconds <Int>] [messages <Int>] [relative-to-publish-rate <true|false>]
subscription-expriation-time <Minutes>
subscription-permissions <Subscription> role <Roles>
subscription-types-enabled <Subscription Type>
Exclusive
Shared
Failover
Key_Shared
unsubscribe <SubscriptionName> [bundle <Bundle>]
set subscription
expire-messages [age <Seconds>]
replicated-subscription-status <enable/disable>
skip all
skip count <Int>
/> set subscription /instance1/cluster1/tenant1/namespace1/topic1/sub1 expire-message
/> set subscription /instance1/cluster1/tenant1/namespace1/topic1/sub1 skip count 10
/instance1/cluster1/tenant1/namespace1/topic1> set subscription sub1 skip all
/instance1/cluster1/tenant1/namespace1/topic1> set subscriptions sub1 replicated-subscription-status enable
set tenant
/> set tenant /instance1/cluster1/tenant1 admin-role admin-12
/instance1/cluster1> set tenant . cluster /instance1/cluster2
set topic
compact
expire-messages age <Seconds>
partitions <Int>
permissions <Actions> role <Role>
replication-clusters <Cluster1,Cluster2>
terminate
/> set topic /instance1/cluster1/tenant1/namespace1/topic1 permissions produce role admin-21
/> set topic /instance1/cluster1/tenant1/namespace1/topic1 partitions 9
/instance1/cluster1/tenant1/namespace1/topic1> set topic . terminate
/instance1/cluster1/tenant1/namespace1/topic1> set topic . expire-messages age 1200