set

Use this command to set an object's configuration value on the Apache Pulsar cluster to which you are connected.

Note: As shown in the examples, the path can either be absolute or relative to the current directory.

Synopsis

set <SetCommandArg> [SetCommandArg Options]

set bookie

set bookie-rack <Cluster> bookie <Bookie> rack-name <RackName> [group <Bookie Group Name>|hostname <Bookie Host Name>]
Configure a bookie rack.

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 values for a broker.

set broker <Cluster> dynamic-config <ConfigParameterName> <ConfigValue>

Set the value of a dynamic configuration parameter for a broker. The available dynamic configuration parameters can be viewed via the show broker dynamic-config command.
Example:
/> 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 the resource quota for a broker.
Examples:
Set the resource quota to 3000 messages per second in and out, 128MB of memory, and bandwidth in and out to 10000 bytes per second.
/> set broker localhost:8080 resource-quota msg-rate-in 3000 msg-rate-out 3000 memory 128 bandwidth-out 10000 bandwidth-in 10000
Set the resource quota to 2000 messages per second in and out, 128MB of memory, bandwidth in and out to 10000 bytes per second, and allow the rates to be dynamically recalculated.
/> 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 the resource quota to 5000 messages per second in and out, 128MB of memory, bandwidth in and out to 15000 bytes per second, and allow the rates to be dynamically recalculated. Apply the resource quota to bundle 0x00000000_0x40000000 of namespace /instance1/cluster1/tenant1/namespace1.
/> 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>]

Note: All the <Filename> parameters are relative to the cluster broker and not to the host running Messaging Manager.

set cluster <Cluster> resource-group <GroupName> [dispatch-bytes <Int>] [dispatch-messages <Int>] [publish-bytes <Int>] [publish-messages <Int>]
Set values for a specified cluster.
set cluster <Cluster> failure-domain <DomainName> [broker <BrokerList>]
Create or modify a failure domain for the cluster.
The optional <BrokerList> is a comma-separated list of broker host:port entries.
Examples:
/> set cluster /instance1/cluster1 failure-domain domain1

/> set cluster /instance1/cluster1 failure-domain domain1 broker broker1:8623,broker2:8723
set cluster <Cluster> namespace-isolation-policy <Name> type <FailoverPolicyType> min-limit <Int> usage-threshold <Int> namespaces <Namespaces> primary <Brokers> [secondary <Brokers>]]
Create or modify a namespace isolation policy for the cluster.
  • <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.
Examples:
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
set cluster <Cluster> peer-clusters <Clusters>
Create or modify a cluster's list of peer clusters.
  • <Clusters> is a comma-separated list of cluster paths, e.g. /instance/cluster
Example:
set cluster /instance1/cluster1 clusters /instance1/cluster2,/instance1/cluster3
set cluster <Cluster> resource-group <GroupName> [dispatch-bytes <Int>] [dispatch-messages <Int>] [publish-bytes <Int>] [publish-messages <Int>]
Create or modify a cluster's resource group.
Example:
set cluster /instance1/cluster1 resource-group rg1 dispatch-bytes 10000 publish-bytes 10000 

set namespace

set namespace <NameSpaceName> <Namespace Option>(See set which follows.)
Set values for the specified namespace.
Examples:
/> 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

For details on the following options, refer to the Apache Pulsar documentation.
  • 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']
  • 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
  • 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

set subscription <Subscription> <Subscription Option>
Set attributes for a specified subscription.
Options include:
  • expire-messages [age <Seconds>]
  • replicated-subscription-status <enable/disable>
  • skip all
  • skip count <Int>
Examples:
/> 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 <Tenant> [admin-roles <AdminRole>] [allowed-clusters <Clusters>]
Assign role and cluster to a tenant.
Examples:
/> set tenant /instance1/cluster1/tenant1 admin-role admin-12

/instance1/cluster1> set tenant . cluster /instance1/cluster2

set topic

set topic <Topic> <Topic Option>
Set values for a specified topic.
Options include:
  • compact
  • expire-messages age <Seconds>
  • partitions <Int>
  • permissions <Actions> role <Role>
  • replication-clusters <Cluster1,Cluster2>
  • terminate
Examples:
/> 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

See Also

reset