Package org.apache.pulsar.client.admin
Interface Namespaces
public interface Namespaces
Admin interface for namespaces management.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clearNamespaceBacklog
(String namespace) Clear backlog for all topics on a namespace.clearNamespaceBacklogAsync
(String namespace) Clear backlog for all topics on a namespace asynchronously.void
clearNamespaceBacklogForSubscription
(String namespace, String subscription) Clear backlog for a given subscription on all topics on a namespace.clearNamespaceBacklogForSubscriptionAsync
(String namespace, String subscription) Clear backlog for a given subscription on all topics on a namespace asynchronously.void
clearNamespaceBundleBacklog
(String namespace, String bundle) Clear backlog for all topics on a namespace bundle.clearNamespaceBundleBacklogAsync
(String namespace, String bundle) Clear backlog for all topics on a namespace bundle asynchronously.void
clearNamespaceBundleBacklogForSubscription
(String namespace, String bundle, String subscription) Clear backlog for a given subscription on all topics on a namespace bundle.clearNamespaceBundleBacklogForSubscriptionAsync
(String namespace, String bundle, String subscription) Clear backlog for a given subscription on all topics on a namespace bundle asynchronously.void
clearOffloadDeleteLag
(String namespace) Clear the offload deletion lag for a namespace.clearOffloadDeleteLagAsync
(String namespace) Clear the offload deletion lag for a namespace asynchronously.void
clearProperties
(String namespace) Clear all properties of a namespace.clearPropertiesAsync
(String namespace) Clear all properties of a namespace asynchronously.void
createNamespace
(String namespace) Create a new namespace.void
createNamespace
(String namespace, int numBundles) Create a new namespace.void
createNamespace
(String namespace, Set<String> clusters) Create a new namespace.void
createNamespace
(String namespace, BundlesData bundlesData) Create a new namespace.void
createNamespace
(String namespace, Policies policies) Create a new namespace.createNamespaceAsync
(String namespace) Create a new namespace asynchronously.createNamespaceAsync
(String namespace, int numBundles) Create a new namespace.createNamespaceAsync
(String namespace, Set<String> clusters) Create a new namespace asynchronously.createNamespaceAsync
(String namespace, BundlesData bundlesData) Create a new namespace asynchronously.createNamespaceAsync
(String namespace, Policies policies) Create a new namespace asynchronously.void
deleteBookieAffinityGroup
(String namespace) Delete bookie affinity group configured for a namespace.deleteBookieAffinityGroupAsync
(String namespace) Delete bookie affinity group configured for a namespace asynchronously.void
deleteNamespace
(String namespace) Delete an existing namespace.void
deleteNamespace
(String namespace, boolean force) Delete an existing namespace.void
deleteNamespaceAntiAffinityGroup
(String namespace) Delete anti-affinity group name for a namespace.deleteNamespaceAntiAffinityGroupAsync
(String namespace) Delete anti-affinity group name for a namespace.deleteNamespaceAsync
(String namespace) Delete an existing namespace asynchronously.deleteNamespaceAsync
(String namespace, boolean force) Delete an existing namespace asynchronously.void
deleteNamespaceBundle
(String namespace, String bundleRange) Delete an existing bundle in a namespace.void
deleteNamespaceBundle
(String namespace, String bundleRange, boolean force) Delete an existing bundle in a namespace.deleteNamespaceBundleAsync
(String namespace, String bundleRange) Delete an existing bundle in a namespace asynchronously.deleteNamespaceBundleAsync
(String namespace, String bundleRange, boolean force) Delete an existing bundle in a namespace asynchronously.getAntiAffinityNamespaces
(String tenant, String cluster, String namespaceAntiAffinityGroup) Get all namespaces that grouped with given anti-affinity group.getAntiAffinityNamespacesAsync
(String tenant, String cluster, String namespaceAntiAffinityGroup) Get all namespaces that grouped with given anti-affinity group asynchronously.getAutoSubscriptionCreation
(String namespace) Get the autoSubscriptionCreation info within a namespace.getAutoSubscriptionCreationAsync
(String namespace) Get the autoSubscriptionCreation info within a namespace asynchronously.getAutoTopicCreation
(String namespace) Get the autoTopicCreation info within a namespace.getAutoTopicCreationAsync
(String namespace) Get the autoTopicCreation info within a namespace asynchronously.getBacklogQuotaMap
(String namespace) Get backlog quota map on a namespace.getBacklogQuotaMapAsync
(String namespace) Get backlog quota map on a namespace asynchronously.getBookieAffinityGroup
(String namespace) Get bookie affinity group configured for a namespace.getBookieAffinityGroupAsync
(String namespace) Get bookie affinity group configured for a namespace asynchronously.getBundles
(String namespace) Get the list of bundles.getBundlesAsync
(String namespace) Get the list of bundles asynchronously.getCompactionThreshold
(String namespace) Get the compactionThreshold for a namespace.getCompactionThresholdAsync
(String namespace) Get the compactionThreshold for a namespace asynchronously.getDeduplicationSnapshotInterval
(String namespace) Get the deduplicationSnapshotInterval for a namespace.getDeduplicationSnapshotIntervalAsync
(String namespace) Get the deduplicationSnapshotInterval for a namespace asynchronously.getDeduplicationStatus
(String namespace) Get the deduplication status for all topics within a namespace .getDeduplicationStatusAsync
(String namespace) Get the deduplication status for all topics within a namespace asynchronously.getDelayedDelivery
(String namespace) Get the delayed delivery messages for all topics within a namespace.getDelayedDeliveryAsync
(String namespace) Get the delayed delivery messages for all topics within a namespace asynchronously.getDispatchRate
(String namespace) Get message-dispatch-rate (topics under this namespace can dispatch this many messages per second).getDispatchRateAsync
(String namespace) Get message-dispatch-rate asynchronously.getEncryptionRequiredStatus
(String namespace) Get the encryption required status within a namespace.getEncryptionRequiredStatusAsync
(String namespace) Get the encryption required status within a namespace asynchronously.getInactiveTopicPolicies
(String namespace) Get the inactive deletion strategy for all topics within a namespace synchronously.getInactiveTopicPoliciesAsync
(String namespace) Get the inactive deletion strategy for all topics within a namespace asynchronously.boolean
getIsAllowAutoUpdateSchema
(String namespace) Get whether allow auto update schema.getIsAllowAutoUpdateSchemaAsync
(String namespace) Get whether allow auto update schema asynchronously.getMaxConsumersPerSubscription
(String namespace) Get the maxConsumersPerSubscription for a namespace.getMaxConsumersPerSubscriptionAsync
(String namespace) Get the maxConsumersPerSubscription for a namespace asynchronously.getMaxConsumersPerTopic
(String namespace) Get the maxProducersPerTopic for a namespace.getMaxConsumersPerTopicAsync
(String namespace) Get the maxProducersPerTopic for a namespace asynchronously.getMaxProducersPerTopic
(String namespace) Get the maxProducersPerTopic for a namespace.getMaxProducersPerTopicAsync
(String namespace) Get the maxProducersPerTopic for a namespace asynchronously.getMaxSubscriptionsPerTopic
(String namespace) Get the maxSubscriptionsPerTopic for a namespace.getMaxSubscriptionsPerTopicAsync
(String namespace) Get the maxSubscriptionsPerTopic for a namespace asynchronously.int
getMaxTopicsPerNamespace
(String namespace) Get maxTopicsPerNamespace for a namespace.getMaxTopicsPerNamespaceAsync
(String namespace) Get maxTopicsPerNamespace for a namespace asynchronously.getMaxUnackedMessagesPerConsumer
(String namespace) Get the maxUnackedMessagesPerConsumer for a namespace.getMaxUnackedMessagesPerConsumerAsync
(String namespace) Get the maxUnackedMessagesPerConsumer for a namespace asynchronously.getMaxUnackedMessagesPerSubscription
(String namespace) Get the maxUnackedMessagesPerSubscription for a namespace.getMaxUnackedMessagesPerSubscriptionAsync
(String namespace) Get the maxUnackedMessagesPerSubscription for a namespace asynchronously.getNamespaceAntiAffinityGroup
(String namespace) Get anti-affinity group name for a namespace.getNamespaceAntiAffinityGroupAsync
(String namespace) Get anti-affinity group name for a namespace asynchronously.getNamespaceEntryFilters
(String namespace) Get entry filters for a namespace.getNamespaceEntryFiltersAsync
(String namespace) Get entry filters for a namespace asynchronously.getNamespaceMessageTTL
(String namespace) Get the message TTL for a namespace.getNamespaceMessageTTLAsync
(String namespace) Get the message TTL for a namespace asynchronously.getNamespaceReplicationClusters
(String namespace) Get the replication clusters for a namespace.getNamespaceReplicationClustersAsync
(String namespace) Get the replication clusters for a namespace asynchronously.getNamespaceResourceGroup
(String namespace) Get the ResourceGroup for a namespace.getNamespaceResourceGroupAsync
(String namespace) Get the ResourceGroup for a namespace asynchronously.getNamespaces
(String tenant) Get the list of namespaces.getNamespaces
(String tenant, String cluster) Deprecated.getNamespacesAsync
(String tenant) Get the list of namespaces asynchronously.getOffloadDeleteLagMs
(String namespace) Get the offload deletion lag for a namespace, in milliseconds.getOffloadDeleteLagMsAsync
(String namespace) Get the offload deletion lag asynchronously for a namespace, in milliseconds.getOffloadPolicies
(String namespace) Get the offload configuration for a namespace.getOffloadPoliciesAsync
(String namespace) Get the offload configuration for a namespace asynchronously.long
getOffloadThreshold
(String namespace) Get the offloadThreshold for a namespace.getOffloadThresholdAsync
(String namespace) Get the offloadThreshold for a namespace asynchronously.long
getOffloadThresholdInSeconds
(String namespace) Get the offloadThresholdInSeconds for a namespace.getOffloadThresholdInSecondsAsync
(String namespace) Get the offloadThresholdInSeconds for a namespace.getPermissionOnSubscription
(String namespace) Get permission to role to access subscription's admin-api.getPermissionOnSubscriptionAsync
(String namespace) Get permission to role to access subscription's admin-api asynchronously.getPermissions
(String namespace) Get permissions on a namespace.getPermissionsAsync
(String namespace) Get permissions on a namespace asynchronously.getPersistence
(String namespace) Get the persistence configuration for a namespace.getPersistenceAsync
(String namespace) Get the persistence configuration for a namespace asynchronously.getPolicies
(String namespace) Get policies for a namespace.getPoliciesAsync
(String namespace) Get policies for a namespace asynchronously.getProperties
(String namespace) Get all properties of a namespace.getPropertiesAsync
(String namespace) Get all properties of a namespace asynchronously.getProperty
(String namespace, String key) Get property value for a given key.getPropertyAsync
(String namespace, String key) Get property value for a given key.getPublishRate
(String namespace) Get message-publish-rate (topics under this namespace can publish this many messages per second).getPublishRateAsync
(String namespace) Get message-publish-rate (topics under this namespace can publish this many messages per second) asynchronously.getReplicationConfigVersion
(String namespace) Get the replication configuration version for a given namespace.getReplicationConfigVersionAsync
(String namespace) Get the replication configuration version for a given namespace asynchronously.getReplicatorDispatchRate
(String namespace) Get replicator-message-dispatch-rate.getReplicatorDispatchRateAsync
(String namespace) Get replicator-message-dispatch-rate asynchronously.getRetention
(String namespace) Get the retention configuration for a namespace.getRetentionAsync
(String namespace) Get the retention configuration for a namespace asynchronously.getSchemaAutoUpdateCompatibilityStrategy
(String namespace) Deprecated.getSchemaCompatibilityStrategy
(String namespace) Get the strategy used to check the a new schema provided by a producer is compatible with the current schema before it is installed.getSchemaCompatibilityStrategyAsync
(String namespace) Get the strategy used to check the a new schema provided by a producer is compatible with the current schema before it is installed asynchronously.boolean
getSchemaValidationEnforced
(String namespace) Get schema validation enforced for namespace.boolean
getSchemaValidationEnforced
(String namespace, boolean applied) Get schema validation enforced for namespace.getSchemaValidationEnforcedAsync
(String namespace) Get schema validation enforced for namespace asynchronously.getSchemaValidationEnforcedAsync
(String namespace, boolean applied) Get schema validation enforced for namespace asynchronously.getSubscribeRate
(String namespace) Get namespace-subscribe-rate (topics under this namespace allow subscribe times per consumer in a period).getSubscribeRateAsync
(String namespace) Get namespace-subscribe-rate asynchronously.getSubscriptionAuthMode
(String namespace) Get the subscriptionAuthMode within a namespace.getSubscriptionAuthModeAsync
(String namespace) Get the subscriptionAuthMode within a namespace asynchronously.getSubscriptionDispatchRate
(String namespace) Get subscription-message-dispatch-rate.getSubscriptionDispatchRateAsync
(String namespace) Get subscription-message-dispatch-rate asynchronously.getSubscriptionExpirationTime
(String namespace) Get the subscription expiration time for a namespace.getSubscriptionExpirationTimeAsync
(String namespace) Get the subscription expiration time for a namespace asynchronously.Set<org.apache.pulsar.client.api.SubscriptionType>
getSubscriptionTypesEnabled
(String namespace) Get the subscriptionTypesEnabled policy for a given namespace, overriding broker settings.CompletableFuture<Set<org.apache.pulsar.client.api.SubscriptionType>>
getSubscriptionTypesEnabledAsync
(String namespace) Get the subscriptionTypesEnabled policy for a given namespace, overriding broker settings.getTopicHashPositions
(String namespace, String bundle, List<String> topics) Get positions for topic list in a bundle.getTopicHashPositionsAsync
(String namespace, String bundle, List<String> topics) Get positions for topic list in a bundle.Get the list of topics.getTopics
(String namespace, ListNamespaceTopicsOptions options) Get the list of topics.getTopicsAsync
(String namespace) Get the list of topics asynchronously.getTopicsAsync
(String namespace, ListNamespaceTopicsOptions options) Get the list of topics asynchronously.void
grantPermissionOnNamespace
(String namespace, String role, Set<AuthAction> actions) Grant permission on a namespace.grantPermissionOnNamespaceAsync
(String namespace, String role, Set<AuthAction> actions) Grant permission on a namespace asynchronously.void
grantPermissionOnSubscription
(String namespace, String subscription, Set<String> roles) Grant permission to role to access subscription's admin-api.grantPermissionOnSubscriptionAsync
(String namespace, String subscription, Set<String> roles) Grant permission to role to access subscription's admin-api asynchronously.void
removeAutoSubscriptionCreation
(String namespace) Removes the autoSubscriptionCreation policy for a given namespace.removeAutoSubscriptionCreationAsync
(String namespace) Removes the autoSubscriptionCreation policy for a given namespace asynchronously.void
removeAutoTopicCreation
(String namespace) Removes the autoTopicCreation policy for a given namespace.removeAutoTopicCreationAsync
(String namespace) Removes the autoTopicCreation policy for a given namespace asynchronously.default void
removeBacklogQuota
(String namespace) void
removeBacklogQuota
(String namespace, BacklogQuota.BacklogQuotaType backlogQuotaType) Remove a backlog quota policy from a namespace.default CompletableFuture<Void>
removeBacklogQuotaAsync
(String namespace) removeBacklogQuotaAsync
(String namespace, BacklogQuota.BacklogQuotaType backlogQuotaType) Remove a backlog quota policy from a namespace asynchronously.void
removeCompactionThreshold
(String namespace) Delete the compactionThreshold for a namespace.removeCompactionThresholdAsync
(String namespace) Delete the compactionThreshold for a namespace asynchronously.void
removeDeduplicationSnapshotInterval
(String namespace) Remove the deduplicationSnapshotInterval for a namespace.removeDeduplicationSnapshotIntervalAsync
(String namespace) Remove the deduplicationSnapshotInterval for a namespace asynchronously.void
removeDeduplicationStatus
(String namespace) Remove the deduplication status for all topics within a namespace.removeDeduplicationStatusAsync
(String namespace) Get the deduplication status for all topics within a namespace asynchronously.void
removeDelayedDeliveryMessages
(String namespace) Remove the delayed delivery messages for all topics within a namespace.removeDelayedDeliveryMessagesAsync
(String namespace) Remove the delayed delivery messages for all topics within a namespace asynchronously.void
removeDispatchRate
(String namespace) Remove message-dispatch-rate.removeDispatchRateAsync
(String namespace) Remove message-dispatch-rate asynchronously.void
removeInactiveTopicPolicies
(String namespace) Remove inactive topic policies from a namespace.removeInactiveTopicPoliciesAsync
(String namespace) remove InactiveTopicPolicies from a namespace asynchronously.void
removeMaxConsumersPerSubscription
(String namespace) Remove maxConsumersPerSubscription for a namespace.removeMaxConsumersPerSubscriptionAsync
(String namespace) Remove maxConsumersPerSubscription for a namespace asynchronously.void
removeMaxConsumersPerTopic
(String namespace) Remove maxConsumersPerTopic for a namespace.removeMaxConsumersPerTopicAsync
(String namespace) Remove maxConsumersPerTopic for a namespace asynchronously.void
removeMaxProducersPerTopic
(String namespace) Remove maxProducersPerTopic for a namespace.removeMaxProducersPerTopicAsync
(String namespace) Set maxProducersPerTopic for a namespace asynchronously.void
removeMaxSubscriptionsPerTopic
(String namespace) Remove the maxSubscriptionsPerTopic for a namespace.removeMaxSubscriptionsPerTopicAsync
(String namespace) Remove the maxSubscriptionsPerTopic for a namespace asynchronously.void
removeMaxTopicsPerNamespace
(String namespace) remove maxTopicsPerNamespace for a namespace.removeMaxTopicsPerNamespaceAsync
(String namespace) remove maxTopicsPerNamespace for a namespace asynchronously.void
removeMaxUnackedMessagesPerConsumer
(String namespace) Remove maxUnackedMessagesPerConsumer for a namespace.removeMaxUnackedMessagesPerConsumerAsync
(String namespace) Remove maxUnackedMessagesPerConsumer for a namespace asynchronously.void
removeMaxUnackedMessagesPerSubscription
(String namespace) Remove maxUnackedMessagesPerSubscription for a namespace.Remove maxUnackedMessagesPerSubscription for a namespace asynchronously.void
removeNamespaceEntryFilters
(String namespace) remove entry filters of a namespace.removeNamespaceEntryFiltersAsync
(String namespace) remove entry filters of a namespace asynchronously.void
removeNamespaceMessageTTL
(String namespace) Remove the messages Time to Live for all the topics within a namespace.removeNamespaceMessageTTLAsync
(String namespace) Remove the messages Time to Live for all the topics within a namespace asynchronously.void
removeNamespaceResourceGroup
(String namespace) Remove the ResourceGroup on a namespace.removeNamespaceResourceGroupAsync
(String namespace) Remove the ResourceGroup on a namespace asynchronously.void
removeOffloadPolicies
(String namespace) Remove the offload configuration for a namespace.removeOffloadPoliciesAsync
(String namespace) Remove the offload configuration for a namespace asynchronously.void
removePersistence
(String namespace) Remove the persistence configuration on a namespace.removePersistenceAsync
(String namespace) Remove the persistence configuration on a namespace asynchronously.removeProperty
(String namespace, String key) Remove a property for a given key.removePropertyAsync
(String namespace, String key) Remove a property for a given key.void
removePublishRate
(String namespace) Remove message-publish-rate (topics under this namespace can publish this many messages per second).removePublishRateAsync
(String namespace) Remove message-publish-rate asynchronously.void
removeReplicatorDispatchRate
(String namespace) Remove replicator-message-dispatch-rate.removeReplicatorDispatchRateAsync
(String namespace) Set replicator-message-dispatch-rate asynchronously.void
removeRetention
(String namespace) Remove the retention configuration for all the topics on a namespace.removeRetentionAsync
(String namespace) Remove the retention configuration for all the topics on a namespace asynchronously.void
removeSubscribeRate
(String namespace) Remove namespace-subscribe-rate (topics under this namespace will limit by subscribeRate).removeSubscribeRateAsync
(String namespace) Remove namespace-subscribe-rate (topics under this namespace will limit by subscribeRate) asynchronously.void
removeSubscriptionDispatchRate
(String namespace) Remove subscription-message-dispatch-rate.removeSubscriptionDispatchRateAsync
(String namespace) Remove subscription-message-dispatch-rate asynchronously.void
removeSubscriptionExpirationTime
(String namespace) Remove the subscription expiration time for a namespace.removeSubscriptionExpirationTimeAsync
(String namespace) Remove the subscription expiration time for a namespace asynchronously.void
removeSubscriptionTypesEnabled
(String namespace) Removes the subscriptionTypesEnabled policy for a given namespace.removeSubscriptionTypesEnabledAsync
(String namespace) Removes the subscriptionTypesEnabled policy for a given namespace.void
revokePermissionOnSubscription
(String namespace, String subscription, String role) Revoke permissions on a subscription's admin-api access.revokePermissionOnSubscriptionAsync
(String namespace, String subscription, String role) Revoke permissions on a subscription's admin-api access asynchronously.void
revokePermissionsOnNamespace
(String namespace, String role) Revoke permissions on a namespace.revokePermissionsOnNamespaceAsync
(String namespace, String role) Revoke permissions on a namespace asynchronously.void
setAutoSubscriptionCreation
(String namespace, AutoSubscriptionCreationOverride autoSubscriptionCreationOverride) Sets the autoSubscriptionCreation policy for a given namespace, overriding broker settings.setAutoSubscriptionCreationAsync
(String namespace, AutoSubscriptionCreationOverride autoSubscriptionCreationOverride) Sets the autoSubscriptionCreation policy for a given namespace, overriding broker settings asynchronously.void
setAutoTopicCreation
(String namespace, AutoTopicCreationOverride autoTopicCreationOverride) Sets the autoTopicCreation policy for a given namespace, overriding broker settings.setAutoTopicCreationAsync
(String namespace, AutoTopicCreationOverride autoTopicCreationOverride) Sets the autoTopicCreation policy for a given namespace, overriding broker settings asynchronously.default void
setBacklogQuota
(String namespace, BacklogQuota backlogQuota) void
setBacklogQuota
(String namespace, BacklogQuota backlogQuota, BacklogQuota.BacklogQuotaType backlogQuotaType) Set a backlog quota for all the topics on a namespace.default CompletableFuture<Void>
setBacklogQuotaAsync
(String namespace, BacklogQuota backlogQuota) setBacklogQuotaAsync
(String namespace, BacklogQuota backlogQuota, BacklogQuota.BacklogQuotaType backlogQuotaType) Set a backlog quota for all the topics on a namespace asynchronously.void
setBookieAffinityGroup
(String namespace, BookieAffinityGroupData bookieAffinityGroup) Set bookie affinity group for a namespace to isolate namespace write to bookies that are part of given affinity group.setBookieAffinityGroupAsync
(String namespace, BookieAffinityGroupData bookieAffinityGroup) Set bookie affinity group for a namespace to isolate namespace write to bookies that are part of given affinity group asynchronously.void
setCompactionThreshold
(String namespace, long compactionThreshold) Set the compactionThreshold for a namespace.setCompactionThresholdAsync
(String namespace, long compactionThreshold) Set the compactionThreshold for a namespace asynchronously.void
setDeduplicationSnapshotInterval
(String namespace, Integer interval) Set the deduplicationSnapshotInterval for a namespace.setDeduplicationSnapshotIntervalAsync
(String namespace, Integer interval) Set the deduplicationSnapshotInterval for a namespace asynchronously.void
setDeduplicationStatus
(String namespace, boolean enableDeduplication) Set the deduplication status for all topics within a namespace.setDeduplicationStatusAsync
(String namespace, boolean enableDeduplication) Set the deduplication status for all topics within a namespace asynchronously.void
setDelayedDeliveryMessages
(String namespace, DelayedDeliveryPolicies delayedDeliveryPolicies) Set the delayed delivery messages for all topics within a namespace.setDelayedDeliveryMessagesAsync
(String namespace, DelayedDeliveryPolicies delayedDeliveryPolicies) Set the delayed delivery messages for all topics within a namespace asynchronously.void
setDispatchRate
(String namespace, DispatchRate dispatchRate) Set message-dispatch-rate (topics under this namespace can dispatch this many messages per second).setDispatchRateAsync
(String namespace, DispatchRate dispatchRate) Set message-dispatch-rate asynchronously.void
setEncryptionRequiredStatus
(String namespace, boolean encryptionRequired) Set the encryption required status for all topics within a namespace.setEncryptionRequiredStatusAsync
(String namespace, boolean encryptionRequired) Set the encryption required status for all topics within a namespace asynchronously.void
setInactiveTopicPolicies
(String namespace, InactiveTopicPolicies inactiveTopicPolicies) As same as setInactiveTopicPoliciesAsync, but it is synchronous.setInactiveTopicPoliciesAsync
(String namespace, InactiveTopicPolicies inactiveTopicPolicies) You can set the inactive deletion strategy at the namespace level.void
setIsAllowAutoUpdateSchema
(String namespace, boolean isAllowAutoUpdateSchema) Set whether to allow automatic schema updates.setIsAllowAutoUpdateSchemaAsync
(String namespace, boolean isAllowAutoUpdateSchema) Set whether to allow automatic schema updates asynchronously.void
setMaxConsumersPerSubscription
(String namespace, int maxConsumersPerSubscription) Set maxConsumersPerSubscription for a namespace.setMaxConsumersPerSubscriptionAsync
(String namespace, int maxConsumersPerSubscription) Set maxConsumersPerSubscription for a namespace asynchronously.void
setMaxConsumersPerTopic
(String namespace, int maxConsumersPerTopic) Set maxConsumersPerTopic for a namespace.setMaxConsumersPerTopicAsync
(String namespace, int maxConsumersPerTopic) Set maxConsumersPerTopic for a namespace asynchronously.void
setMaxProducersPerTopic
(String namespace, int maxProducersPerTopic) Set maxProducersPerTopic for a namespace.setMaxProducersPerTopicAsync
(String namespace, int maxProducersPerTopic) Set maxProducersPerTopic for a namespace asynchronously.void
setMaxSubscriptionsPerTopic
(String namespace, int maxSubscriptionsPerTopic) Set the maxSubscriptionsPerTopic for a namespace.setMaxSubscriptionsPerTopicAsync
(String namespace, int maxSubscriptionsPerTopic) Set the maxSubscriptionsPerTopic for a namespace asynchronously.void
setMaxTopicsPerNamespace
(String namespace, int maxTopicsPerNamespace) Set maxTopicsPerNamespace for a namespace.setMaxTopicsPerNamespaceAsync
(String namespace, int maxTopicsPerNamespace) Set maxTopicsPerNamespace for a namespace asynchronously.void
setMaxUnackedMessagesPerConsumer
(String namespace, int maxUnackedMessagesPerConsumer) Set maxUnackedMessagesPerConsumer for a namespace.setMaxUnackedMessagesPerConsumerAsync
(String namespace, int maxUnackedMessagesPerConsumer) Set maxUnackedMessagesPerConsumer for a namespace asynchronously.void
setMaxUnackedMessagesPerSubscription
(String namespace, int maxUnackedMessagesPerSubscription) Set maxUnackedMessagesPerSubscription for a namespace.setMaxUnackedMessagesPerSubscriptionAsync
(String namespace, int maxUnackedMessagesPerSubscription) Set maxUnackedMessagesPerSubscription for a namespace asynchronously.void
setNamespaceAntiAffinityGroup
(String namespace, String namespaceAntiAffinityGroup) Set anti-affinity group name for a namespace.setNamespaceAntiAffinityGroupAsync
(String namespace, String namespaceAntiAffinityGroup) Set anti-affinity group name for a namespace asynchronously.void
setNamespaceEntryFilters
(String namespace, EntryFilters entryFilters) Set entry filters on a namespace.setNamespaceEntryFiltersAsync
(String namespace, EntryFilters entryFilters) Set entry filters on a namespace asynchronously.void
setNamespaceMessageTTL
(String namespace, int ttlInSeconds) Set the messages Time to Live for all the topics within a namespace.setNamespaceMessageTTLAsync
(String namespace, int ttlInSeconds) Set the messages Time to Live for all the topics within a namespace asynchronously.void
setNamespaceReplicationClusters
(String namespace, Set<String> clusterIds) Set the replication clusters for a namespace.setNamespaceReplicationClustersAsync
(String namespace, Set<String> clusterIds) Set the replication clusters for a namespace asynchronously.void
setNamespaceResourceGroup
(String namespace, String resourcegroupname) Set the ResourceGroup for a namespace.setNamespaceResourceGroupAsync
(String namespace, String resourcegroupname) Set the ResourceGroup for a namespace asynchronously.void
setOffloadDeleteLag
(String namespace, long lag, TimeUnit unit) Set the offload deletion lag for a namespace.setOffloadDeleteLagAsync
(String namespace, long lag, TimeUnit unit) Set the offload deletion lag for a namespace asynchronously.void
setOffloadPolicies
(String namespace, OffloadPolicies offloadPolicies) Set the offload configuration for all the topics in a namespace.setOffloadPoliciesAsync
(String namespace, OffloadPolicies offloadPolicies) Set the offload configuration for all the topics in a namespace asynchronously.void
setOffloadThreshold
(String namespace, long offloadThreshold) Set the offloadThreshold for a namespace.setOffloadThresholdAsync
(String namespace, long offloadThreshold) Set the offloadThreshold for a namespace asynchronously.void
setOffloadThresholdInSeconds
(String namespace, long offloadThresholdInSeconds) Set the offloadThresholdInSeconds for a namespace.setOffloadThresholdInSecondsAsync
(String namespace, long offloadThresholdInSeconds) Set the offloadThresholdInSeconds for a namespace.void
setPersistence
(String namespace, PersistencePolicies persistence) Set the persistence configuration for all the topics on a namespace.setPersistenceAsync
(String namespace, PersistencePolicies persistence) Set the persistence configuration for all the topics on a namespace asynchronously.void
setProperties
(String namespace, Map<String, String> properties) Set key value pair properties for a namespace.setPropertiesAsync
(String namespace, Map<String, String> properties) Set key value pair properties for a namespace asynchronously.void
setProperty
(String namespace, String key, String value) Set key value pair property for a namespace.setPropertyAsync
(String namespace, String key, String value) Set key value pair property for a namespace.void
setPublishRate
(String namespace, PublishRate publishMsgRate) Set message-publish-rate (topics under this namespace can publish this many messages per second).setPublishRateAsync
(String namespace, PublishRate publishMsgRate) Set message-publish-rate (topics under this namespace can publish this many messages per second) asynchronously.void
setReplicatorDispatchRate
(String namespace, DispatchRate dispatchRate) Set replicator-message-dispatch-rate.setReplicatorDispatchRateAsync
(String namespace, DispatchRate dispatchRate) Set replicator-message-dispatch-rate asynchronously.void
setRetention
(String namespace, RetentionPolicies retention) Set the retention configuration for all the topics on a namespace.setRetentionAsync
(String namespace, RetentionPolicies retention) Set the retention configuration for all the topics on a namespace asynchronously.void
setSchemaAutoUpdateCompatibilityStrategy
(String namespace, SchemaAutoUpdateCompatibilityStrategy strategy) Deprecated.void
setSchemaCompatibilityStrategy
(String namespace, SchemaCompatibilityStrategy strategy) Set the strategy used to check the a new schema provided by a producer is compatible with the current schema before it is installed.setSchemaCompatibilityStrategyAsync
(String namespace, SchemaCompatibilityStrategy strategy) Set the strategy used to check the a new schema provided by a producer is compatible with the current schema before it is installed asynchronously.void
setSchemaValidationEnforced
(String namespace, boolean schemaValidationEnforced) Set schema validation enforced for namespace.setSchemaValidationEnforcedAsync
(String namespace, boolean schemaValidationEnforced) Set schema validation enforced for namespace asynchronously.void
setSubscribeRate
(String namespace, SubscribeRate subscribeRate) Set namespace-subscribe-rate (topics under this namespace will limit by subscribeRate).setSubscribeRateAsync
(String namespace, SubscribeRate subscribeRate) Set namespace-subscribe-rate (topics under this namespace will limit by subscribeRate) asynchronously.void
setSubscriptionAuthMode
(String namespace, SubscriptionAuthMode subscriptionAuthMode) Set the given subscription auth mode on all topics on a namespace.setSubscriptionAuthModeAsync
(String namespace, SubscriptionAuthMode subscriptionAuthMode) Set the given subscription auth mode on all topics on a namespace asynchronously.void
setSubscriptionDispatchRate
(String namespace, DispatchRate dispatchRate) Set subscription-message-dispatch-rate.setSubscriptionDispatchRateAsync
(String namespace, DispatchRate dispatchRate) Set subscription-message-dispatch-rate asynchronously.void
setSubscriptionExpirationTime
(String namespace, int expirationTime) Set the subscription expiration time in minutes for all the topics within a namespace.setSubscriptionExpirationTimeAsync
(String namespace, int expirationTime) Set the subscription expiration time in minutes for all the topics within a namespace asynchronously.void
setSubscriptionTypesEnabled
(String namespace, Set<org.apache.pulsar.client.api.SubscriptionType> subscriptionTypesEnabled) Sets the subscriptionTypesEnabled policy for a given namespace, overriding broker settings.setSubscriptionTypesEnabledAsync
(String namespace, Set<org.apache.pulsar.client.api.SubscriptionType> subscriptionTypesEnabled) Sets the subscriptionTypesEnabled policy for a given namespace, overriding broker settings.void
splitNamespaceBundle
(String namespace, String bundle, boolean unloadSplitBundles, String splitAlgorithmName) Split namespace bundle.void
splitNamespaceBundle
(String namespace, String bundle, boolean unloadSplitBundles, String splitAlgorithmName, List<Long> splitBoundaries) Split namespace bundle.splitNamespaceBundleAsync
(String namespace, String bundle, boolean unloadSplitBundles, String splitAlgorithmName) Split namespace bundle asynchronously.splitNamespaceBundleAsync
(String namespace, String bundle, boolean unloadSplitBundles, String splitAlgorithmName, List<Long> splitBoundaries) Split namespace bundle asynchronously.void
Unload a namespace from the current serving broker.unloadAsync
(String namespace) Unload a namespace from the current serving broker asynchronously.void
unloadNamespaceBundle
(String namespace, String bundle) Unload namespace bundle.void
unloadNamespaceBundle
(String namespace, String bundle, String destinationBroker) Unload namespace bundle and assign the bundle to specified broker.unloadNamespaceBundleAsync
(String namespace, String bundle) Unload namespace bundle asynchronously.unloadNamespaceBundleAsync
(String namespace, String bundle, String destinationBroker) Unload namespace bundle asynchronously.void
unsubscribeNamespace
(String namespace, String subscription) Unsubscribe the given subscription on all topics on a namespace.unsubscribeNamespaceAsync
(String namespace, String subscription) Unsubscribe the given subscription on all topics on a namespace asynchronously.void
unsubscribeNamespaceBundle
(String namespace, String bundle, String subscription) Unsubscribe the given subscription on all topics on a namespace bundle.unsubscribeNamespaceBundleAsync
(String namespace, String bundle, String subscription) Unsubscribe the given subscription on all topics on a namespace bundle asynchronously.
-
Method Details
-
getNamespaces
Get the list of namespaces. Get the list of all the namespaces for a certain tenant. Response Example:["my-tenant/c1/namespace1", "my-tenant/global/namespace2", "my-tenant/c2/namespace3"]
- Parameters:
tenant
- Tenant name- Throws:
PulsarAdminException.NotAuthorizedException
- Don't have admin permissionPulsarAdminException.NotFoundException
- Tenant does not existPulsarAdminException
- Unexpected error
-
getNamespacesAsync
Get the list of namespaces asynchronously. Get the list of all the namespaces for a certain tenant. Response Example:["my-tenant/c1/namespace1", "my-tenant/global/namespace2", "my-tenant/c2/namespace3"]
- Parameters:
tenant
- Tenant name
-
getNamespaces
Deprecated.Get the list of namespaces. Get the list of all the namespaces for a certain tenant on single cluster. Response Example:["my-tenant/use/namespace1", "my-tenant/use/namespace2"]
- Parameters:
tenant
- Tenant namecluster
- Cluster name- Throws:
PulsarAdminException.NotAuthorizedException
- Don't have admin permissionPulsarAdminException.NotFoundException
- Tenant or cluster does not existPulsarAdminException
- Unexpected error
-
getTopics
Get the list of topics. Get the list of all the topics under a certain namespace. Response Example:["persistent://my-tenant/use/namespace1/my-topic-1", "persistent://my-tenant/use/namespace1/my-topic-2"]
- Parameters:
namespace
- Namespace name- Throws:
PulsarAdminException.NotAuthorizedException
- You don't have admin permissionPulsarAdminException.NotFoundException
- Namespace does not existPulsarAdminException
- Unexpected error
-
getTopicsAsync
Get the list of topics asynchronously. Get the list of all the topics under a certain namespace. Response Example:["persistent://my-tenant/use/namespace1/my-topic-1", "persistent://my-tenant/use/namespace1/my-topic-2"]
- Parameters:
namespace
- Namespace name
-
getTopics
List<String> getTopics(String namespace, ListNamespaceTopicsOptions options) throws PulsarAdminException Get the list of topics. Get the list of all the topics under a certain namespace. Response Example:["persistent://my-tenant/use/namespace1/my-topic-1", "persistent://my-tenant/use/namespace1/my-topic-2"]
- Parameters:
namespace
- Namespace nameoptions
- List namespace topics options- Throws:
PulsarAdminException.NotAuthorizedException
- You don't have admin permissionPulsarAdminException.NotFoundException
- Namespace does not existPulsarAdminException
- Unexpected error
-
getTopicsAsync
CompletableFuture<List<String>> getTopicsAsync(String namespace, ListNamespaceTopicsOptions options) Get the list of topics asynchronously. Get the list of all the topics under a certain namespace. Response Example:["persistent://my-tenant/use/namespace1/my-topic-1", "persistent://my-tenant/use/namespace1/my-topic-2"]
- Parameters:
namespace
- Namespace nameoptions
- List namespace topics options
-
getBundles
Get the list of bundles. Get the list of all the bundles under a certain namespace.- Parameters:
namespace
- Namespace name- Throws:
PulsarAdminException.NotAuthorizedException
- You don't have admin permissionPulsarAdminException.NotFoundException
- Namespace does not existPulsarAdminException
- Unexpected error
-
getBundlesAsync
Get the list of bundles asynchronously. Get the list of all the bundles under a certain namespace.- Parameters:
namespace
- Namespace name
-
getPolicies
Get policies for a namespace. Get the dump all the policies specified for a namespace. Response example:{ "auth_policies" : { "namespace_auth" : { "my-role" : [ "produce" ] }, "destination_auth" : { "persistent://prop/local/ns1/my-topic" : { "role-1" : [ "produce" ], "role-2" : [ "consume" ] } } }, "replication_clusters" : ["use", "usw"], "message_ttl_in_seconds" : 300 }
- Parameters:
namespace
- Namespace name- Throws:
PulsarAdminException.NotAuthorizedException
- You don't have admin permissionPulsarAdminException.NotFoundException
- Namespace does not existPulsarAdminException
- Unexpected error- See Also:
-
getPoliciesAsync
Get policies for a namespace asynchronously. Get the dump all the policies specified for a namespace. Response example:{ "auth_policies" : { "namespace_auth" : { "my-role" : [ "produce" ] }, "destination_auth" : { "persistent://prop/local/ns1/my-topic" : { "role-1" : [ "produce" ], "role-2" : [ "consume" ] } } }, "replication_clusters" : ["use", "usw"], "message_ttl_in_seconds" : 300 }
- Parameters:
namespace
- Namespace name- See Also:
-
createNamespace
Create a new namespace. Creates a new empty namespace with no policies attached.- Parameters:
namespace
- Namespace namenumBundles
- Number of bundles- Throws:
PulsarAdminException.NotAuthorizedException
- You don't have admin permissionPulsarAdminException.NotFoundException
- Tenant or cluster does not existPulsarAdminException.ConflictException
- Namespace already existsPulsarAdminException
- Unexpected error
-
createNamespaceAsync
Create a new namespace. Creates a new empty namespace with no policies attached.- Parameters:
namespace
- Namespace namenumBundles
- Number of bundles
-
createNamespace
Create a new namespace. Creates a new empty namespace with no policies attached.- Parameters:
namespace
- Namespace namebundlesData
- Bundles Data- Throws:
PulsarAdminException.NotAuthorizedException
- You don't have admin permissionPulsarAdminException.NotFoundException
- Tenant or cluster does not existPulsarAdminException.ConflictException
- Namespace already existsPulsarAdminException
- Unexpected error
-
createNamespaceAsync
Create a new namespace asynchronously. Creates a new empty namespace with no policies attached.- Parameters:
namespace
- Namespace namebundlesData
- Bundles Data
-
createNamespace
Create a new namespace. Creates a new empty namespace with no policies attached.- Parameters:
namespace
- Namespace name- Throws:
PulsarAdminException.NotAuthorizedException
- You don't have admin permissionPulsarAdminException.NotFoundException
- Tenant or cluster does not existPulsarAdminException.ConflictException
- Namespace already existsPulsarAdminException
- Unexpected error
-
createNamespaceAsync
Create a new namespace asynchronously. Creates a new empty namespace with no policies attached.- Parameters:
namespace
- Namespace name
-
createNamespace
Create a new namespace. Creates a new empty namespace with no policies attached.- Parameters:
namespace
- Namespace nameclusters
- Clusters in which the namespace will be present. If more than one cluster is present, replication across clusters will be enabled.- Throws:
PulsarAdminException.NotAuthorizedException
- You don't have admin permissionPulsarAdminException.NotFoundException
- Tenant or cluster does not existPulsarAdminException.ConflictException
- Namespace already existsPulsarAdminException
- Unexpected error
-
createNamespaceAsync
Create a new namespace asynchronously. Creates a new empty namespace with no policies attached.- Parameters:
namespace
- Namespace nameclusters
- Clusters in which the namespace will be present. If more than one cluster is present, replication across clusters will be enabled.
-
createNamespace
Create a new namespace. Creates a new namespace with the specified policies.- Parameters:
namespace
- Namespace namepolicies
- Policies for the namespace- Throws:
PulsarAdminException.NotAuthorizedException
- You don't have admin permissionPulsarAdminException.NotFoundException
- Tenant or cluster does not existPulsarAdminException.ConflictException
- Namespace already existsPulsarAdminException
- Unexpected error- Since:
- 2.0
-
createNamespaceAsync
Create a new namespace asynchronously. Creates a new namespace with the specified policies.- Parameters:
namespace
- Namespace namepolicies
- Policies for the namespace
-
deleteNamespace
Delete an existing namespace. The namespace needs to be empty.- Parameters:
namespace
- Namespace name- Throws:
PulsarAdminException.NotAuthorizedException
- You don't have admin permissionPulsarAdminException.NotFoundException
- Namespace does not existPulsarAdminException.ConflictException
- Namespace is not emptyPulsarAdminException
- Unexpected error
-
deleteNamespace
Delete an existing namespace. Force flag deletes namespace forcefully by force deleting all topics under it.- Parameters:
namespace
- Namespace nameforce
- Delete namespace forcefully- Throws:
PulsarAdminException.NotAuthorizedException
- You don't have admin permissionPulsarAdminException.NotFoundException
- Namespace does not existPulsarAdminException.ConflictException
- Namespace is not emptyPulsarAdminException
- Unexpected error
-
deleteNamespaceAsync
Delete an existing namespace asynchronously. The namespace needs to be empty.- Parameters:
namespace
- Namespace name
-
deleteNamespaceAsync
Delete an existing namespace asynchronously. Force flag deletes namespace forcefully by force deleting all topics under it.- Parameters:
namespace
- Namespace nameforce
- Delete namespace forcefully
-
deleteNamespaceBundle
Delete an existing bundle in a namespace. The bundle needs to be empty.- Parameters:
namespace
- Namespace namebundleRange
- range of the bundle- Throws:
PulsarAdminException.NotAuthorizedException
- You don't have admin permissionPulsarAdminException.NotFoundException
- Namespace/bundle does not existPulsarAdminException.ConflictException
- Bundle is not emptyPulsarAdminException
- Unexpected error
-
deleteNamespaceBundle
void deleteNamespaceBundle(String namespace, String bundleRange, boolean force) throws PulsarAdminException Delete an existing bundle in a namespace. Force flag deletes bundle forcefully.- Parameters:
namespace
- Namespace namebundleRange
- range of the bundleforce
- Delete bundle forcefully- Throws:
PulsarAdminException.NotAuthorizedException
- You don't have admin permissionPulsarAdminException.NotFoundException
- Namespace/bundle does not existPulsarAdminException.ConflictException
- Bundle is not emptyPulsarAdminException
- Unexpected error
-
deleteNamespaceBundleAsync
Delete an existing bundle in a namespace asynchronously. The bundle needs to be empty.- Parameters:
namespace
- Namespace namebundleRange
- range of the bundle- Returns:
- a future that can be used to track when the bundle is deleted
-
deleteNamespaceBundleAsync
CompletableFuture<Void> deleteNamespaceBundleAsync(String namespace, String bundleRange, boolean force) Delete an existing bundle in a namespace asynchronously. Force flag deletes bundle forcefully.- Parameters:
namespace
- Namespace namebundleRange
- range of the bundleforce
- Delete bundle forcefully- Returns:
- a future that can be used to track when the bundle is deleted
-
getPermissions
Get permissions on a namespace. Retrieve the permissions for a namespace. Response example:{ "my-role" : [ "produce" ] "other-role" : [ "consume" ] }
- Parameters:
namespace
- Namespace name- Throws:
PulsarAdminException.NotAuthorizedException
- You don't have admin permissionPulsarAdminException.NotFoundException
- Namespace does not existPulsarAdminException
- Unexpected error
-
getPermissionsAsync
Get permissions on a namespace asynchronously. Retrieve the permissions for a namespace. Response example:{ "my-role" : [ "produce" ] "other-role" : [ "consume" ] }
- Parameters:
namespace
- Namespace name
-
grantPermissionOnNamespace
void grantPermissionOnNamespace(String namespace, String role, Set<AuthAction> actions) throws PulsarAdminException Grant permission on a namespace. Grant a new permission to a client role on a namespace. Request parameter example:["produce", "consume"]
- Parameters:
namespace
- Namespace namerole
- Client role to which grant permissionactions
- Auth actions (produce and consume)- Throws:
PulsarAdminException.NotAuthorizedException
- Don't have admin permissionPulsarAdminException.NotFoundException
- Namespace does not existPulsarAdminException.ConflictException
- Concurrent modificationPulsarAdminException
- Unexpected error
-
grantPermissionOnNamespaceAsync
CompletableFuture<Void> grantPermissionOnNamespaceAsync(String namespace, String role, Set<AuthAction> actions) Grant permission on a namespace asynchronously. Grant a new permission to a client role on a namespace. Request parameter example:["produce", "consume"]
- Parameters:
namespace
- Namespace namerole
- Client role to which grant permissionactions
- Auth actions (produce and consume)
-
revokePermissionsOnNamespace
Revoke permissions on a namespace. Revoke all permissions to a client role on a namespace.- Parameters:
namespace
- Namespace namerole
- Client role to which remove permissions- Throws:
PulsarAdminException.NotAuthorizedException
- Don't have admin permissionPulsarAdminException.NotFoundException
- Namespace does not existPulsarAdminException
- Unexpected error
-
revokePermissionsOnNamespaceAsync
Revoke permissions on a namespace asynchronously. Revoke all permissions to a client role on a namespace.- Parameters:
namespace
- Namespace namerole
- Client role to which remove permissions
-
getPermissionOnSubscription
Get permission to role to access subscription's admin-api.- Parameters:
namespace
-- Throws:
PulsarAdminException
-
getPermissionOnSubscriptionAsync
Get permission to role to access subscription's admin-api asynchronously.- Parameters:
namespace
-
-
grantPermissionOnSubscription
void grantPermissionOnSubscription(String namespace, String subscription, Set<String> roles) throws PulsarAdminException Grant permission to role to access subscription's admin-api.- Parameters:
namespace
-subscription
-roles
-- Throws:
PulsarAdminException
-
grantPermissionOnSubscriptionAsync
CompletableFuture<Void> grantPermissionOnSubscriptionAsync(String namespace, String subscription, Set<String> roles) Grant permission to role to access subscription's admin-api asynchronously.- Parameters:
namespace
-subscription
-roles
-
-
revokePermissionOnSubscription
void revokePermissionOnSubscription(String namespace, String subscription, String role) throws PulsarAdminException Revoke permissions on a subscription's admin-api access.- Parameters:
namespace
-subscription
-role
-- Throws:
PulsarAdminException
-
revokePermissionOnSubscriptionAsync
CompletableFuture<Void> revokePermissionOnSubscriptionAsync(String namespace, String subscription, String role) Revoke permissions on a subscription's admin-api access asynchronously.- Parameters:
namespace
-subscription
-role
-
-
getNamespaceReplicationClusters
Get the replication clusters for a namespace. Response example:["use", "usw", "usc"]
- Parameters:
namespace
- Namespace name- Throws:
PulsarAdminException.NotAuthorizedException
- Don't have admin permissionPulsarAdminException.NotFoundException
- Namespace does not existPulsarAdminException.PreconditionFailedException
- Namespace is not globalPulsarAdminException
- Unexpected error
-
getNamespaceReplicationClustersAsync
Get the replication clusters for a namespace asynchronously. Response example:["use", "usw", "usc"]
- Parameters:
namespace
- Namespace name
-
setNamespaceReplicationClusters
void setNamespaceReplicationClusters(String namespace, Set<String> clusterIds) throws PulsarAdminException Set the replication clusters for a namespace. Request example:["us-west", "us-east", "us-cent"]
- Parameters:
namespace
- Namespace nameclusterIds
- Pulsar Cluster Ids- Throws:
PulsarAdminException.NotAuthorizedException
- Don't have admin permissionPulsarAdminException.NotFoundException
- Namespace does not existPulsarAdminException.PreconditionFailedException
- Namespace is not globalPulsarAdminException.PreconditionFailedException
- Invalid cluster idsPulsarAdminException
- Unexpected error
-
setNamespaceReplicationClustersAsync
CompletableFuture<Void> setNamespaceReplicationClustersAsync(String namespace, Set<String> clusterIds) Set the replication clusters for a namespace asynchronously. Request example:["us-west", "us-east", "us-cent"]
- Parameters:
namespace
- Namespace nameclusterIds
- Pulsar Cluster Ids
-
getNamespaceMessageTTL
Get the message TTL for a namespace. Response example:60
- Parameters:
namespace
- Namespace name- Throws:
PulsarAdminException.NotAuthorizedException
- Don't have admin permissionPulsarAdminException.NotFoundException
- Namespace does not existPulsarAdminException
- Unexpected error
-
getNamespaceMessageTTLAsync
Get the message TTL for a namespace asynchronously. Response example:60
- Parameters:
namespace
- Namespace name
-
setNamespaceMessageTTL
Set the messages Time to Live for all the topics within a namespace. Request example:60
- Parameters:
namespace
- Namespace namettlInSeconds
- TTL values for all messages for all topics in this namespace- Throws:
PulsarAdminException.NotAuthorizedException
- Don't have admin permissionPulsarAdminException.NotFoundException
- Namespace does not existPulsarAdminException
- Unexpected error
-
setNamespaceMessageTTLAsync
Set the messages Time to Live for all the topics within a namespace asynchronously. Request example:60
- Parameters:
namespace
- Namespace namettlInSeconds
- TTL values for all messages for all topics in this namespace
-
removeNamespaceMessageTTL
Remove the messages Time to Live for all the topics within a namespace.- Parameters:
namespace
-- Throws:
PulsarAdminException
-
removeNamespaceMessageTTLAsync
Remove the messages Time to Live for all the topics within a namespace asynchronously.- Parameters:
namespace
-- Returns:
-
getSubscriptionExpirationTime
Get the subscription expiration time for a namespace. Response example:1440
- Parameters:
namespace
- Namespace name- Throws:
PulsarAdminException.NotAuthorizedException
- Don't have admin permissionPulsarAdminException.NotFoundException
- Namespace does not existPulsarAdminException
- Unexpected error
-
getSubscriptionExpirationTimeAsync
Get the subscription expiration time for a namespace asynchronously. Response example:1440
- Parameters:
namespace
- Namespace name
-
setSubscriptionExpirationTime
void setSubscriptionExpirationTime(String namespace, int expirationTime) throws PulsarAdminException Set the subscription expiration time in minutes for all the topics within a namespace. Request example:1440
- Parameters:
namespace
- Namespace nameexpirationTime
- Expiration time values for all subscriptions for all topics in this namespace- Throws:
PulsarAdminException.NotAuthorizedException
- Don't have admin permissionPulsarAdminException.NotFoundException
- Namespace does not existPulsarAdminException
- Unexpected error
-
setSubscriptionExpirationTimeAsync
Set the subscription expiration time in minutes for all the topics within a namespace asynchronously. Request example:1440
- Parameters:
namespace
- Namespace nameexpirationTime
- Expiration time values for all subscriptions for all topics in this namespace
-
removeSubscriptionExpirationTime
Remove the subscription expiration time for a namespace.- Parameters:
namespace
- Namespace name- Throws:
PulsarAdminException.NotAuthorizedException
- Don't have admin permissionPulsarAdminException.NotFoundException
- Namespace does not existPulsarAdminException
- Unexpected error
-
removeSubscriptionExpirationTimeAsync
Remove the subscription expiration time for a namespace asynchronously.- Parameters:
namespace
- Namespace name
-
setNamespaceAntiAffinityGroup
void setNamespaceAntiAffinityGroup(String namespace, String namespaceAntiAffinityGroup) throws PulsarAdminException Set anti-affinity group name for a namespace. Request example:- Parameters:
namespace
- Namespace namenamespaceAntiAffinityGroup
- anti-affinity group name for a namespace- Throws:
PulsarAdminException.NotAuthorizedException
- Don't have admin permissionPulsarAdminException.NotFoundException
- Namespace does not existPulsarAdminException
- Unexpected error
-
setNamespaceAntiAffinityGroupAsync
CompletableFuture<Void> setNamespaceAntiAffinityGroupAsync(String namespace, String namespaceAntiAffinityGroup) Set anti-affinity group name for a namespace asynchronously. Request example:- Parameters:
namespace
- Namespace namenamespaceAntiAffinityGroup
- anti-affinity group name for a namespace
-
getAntiAffinityNamespaces
List<String> getAntiAffinityNamespaces(String tenant, String cluster, String namespaceAntiAffinityGroup) throws PulsarAdminException Get all namespaces that grouped with given anti-affinity group.- Parameters:
tenant
- tenant is only used for authorization. Client has to be admin of any of the tenant to access this api api.cluster
- cluster namenamespaceAntiAffinityGroup
- Anti-affinity group name- Returns:
- list of namespace grouped under a given anti-affinity group
- Throws:
PulsarAdminException
-
getAntiAffinityNamespacesAsync
CompletableFuture<List<String>> getAntiAffinityNamespacesAsync(String tenant, String cluster, String namespaceAntiAffinityGroup) Get all namespaces that grouped with given anti-affinity group asynchronously.- Parameters:
tenant
- tenant is only used for authorization. Client has to be admin of any of the tenant to access this api api.cluster
- cluster namenamespaceAntiAffinityGroup
- Anti-affinity group name- Returns:
- list of namespace grouped under a given anti-affinity group
-
getNamespaceAntiAffinityGroup
Get anti-affinity group name for a namespace. Response example:60
- Parameters:
namespace
- Namespace name- Throws:
PulsarAdminException.NotAuthorizedException
- Don't have admin permissionPulsarAdminException.NotFoundException
- Namespace does not existPulsarAdminException
- Unexpected error
-
getNamespaceAntiAffinityGroupAsync
Get anti-affinity group name for a namespace asynchronously. Response example:60
- Parameters:
namespace
- Namespace name
-
deleteNamespaceAntiAffinityGroup
Delete anti-affinity group name for a namespace.- Parameters:
namespace
- Namespace name- Throws:
PulsarAdminException.NotAuthorizedException
- You don't have admin permissionPulsarAdminException.NotFoundException
- Namespace does not existPulsarAdminException
- Unexpected error
-
deleteNamespaceAntiAffinityGroupAsync
Delete anti-affinity group name for a namespace.- Parameters:
namespace
- Namespace name
-
removeDeduplicationStatus
Remove the deduplication status for all topics within a namespace.- Parameters:
namespace
-- Throws:
PulsarAdminException
-
removeDeduplicationStatusAsync
Get the deduplication status for all topics within a namespace asynchronously.- Parameters:
namespace
-- Returns:
-
getDeduplicationStatus
Get the deduplication status for all topics within a namespace .- Parameters:
namespace
-- Returns:
- Throws:
PulsarAdminException
-
getDeduplicationStatusAsync
Get the deduplication status for all topics within a namespace asynchronously.- Parameters:
namespace
-- Returns:
-
setDeduplicationStatus
void setDeduplicationStatus(String namespace, boolean enableDeduplication) throws PulsarAdminException Set the deduplication status for all topics within a namespace. When deduplication is enabled, the broker will prevent to store the same message multiple times. Request example:true
- Parameters:
namespace
- Namespace nameenableDeduplication
- wether to enable or disable deduplication feature- Throws:
PulsarAdminException.NotAuthorizedException
- Don't have admin permissionPulsarAdminException.NotFoundException
- Namespace does not existPulsarAdminException
- Unexpected error
-
setDeduplicationStatusAsync
Set the deduplication status for all topics within a namespace asynchronously. When deduplication is enabled, the broker will prevent to store the same message multiple times. Request example:true
- Parameters:
namespace
- Namespace nameenableDeduplication
- wether to enable or disable deduplication feature
-
setAutoTopicCreation
void setAutoTopicCreation(String namespace, AutoTopicCreationOverride autoTopicCreationOverride) throws PulsarAdminException Sets the autoTopicCreation policy for a given namespace, overriding broker settings. When autoTopicCreationOverride is enabled, new topics will be created upon connection, regardless of the broker level configuration. Request example:{ "allowAutoTopicCreation" : true, "topicType" : "partitioned", "defaultNumPartitions": 2 }
- Parameters:
namespace
- Namespace nameautoTopicCreationOverride
- Override policies for auto topic creation- Throws:
PulsarAdminException.NotAuthorizedException
- Don't have admin permissionPulsarAdminException.NotFoundException
- Namespace does not existPulsarAdminException
- Unexpected error
-
setAutoTopicCreationAsync
CompletableFuture<Void> setAutoTopicCreationAsync(String namespace, AutoTopicCreationOverride autoTopicCreationOverride) Sets the autoTopicCreation policy for a given namespace, overriding broker settings asynchronously. When autoTopicCreationOverride is enabled, new topics will be created upon connection, regardless of the broker level configuration. Request example:{ "allowAutoTopicCreation" : true, "topicType" : "partitioned", "defaultNumPartitions": 2 }
- Parameters:
namespace
- Namespace nameautoTopicCreationOverride
- Override policies for auto topic creation
-
getAutoTopicCreation
Get the autoTopicCreation info within a namespace.- Parameters:
namespace
-- Returns:
- Throws:
PulsarAdminException
-
getAutoTopicCreationAsync
Get the autoTopicCreation info within a namespace asynchronously.- Parameters:
namespace
-- Returns:
-
removeAutoTopicCreation
Removes the autoTopicCreation policy for a given namespace. Allowing the broker to dictate the auto-creation policy.- Parameters:
namespace
- Namespace name- Throws:
PulsarAdminException.NotAuthorizedException
- Don't have admin permissionPulsarAdminException.NotFoundException
- Namespace does not existPulsarAdminException
- Unexpected error
-
removeAutoTopicCreationAsync
Removes the autoTopicCreation policy for a given namespace asynchronously. Allowing the broker to dictate the auto-creation policy.- Parameters:
namespace
- Namespace name
-
setAutoSubscriptionCreation
void setAutoSubscriptionCreation(String namespace, AutoSubscriptionCreationOverride autoSubscriptionCreationOverride) throws PulsarAdminException Sets the autoSubscriptionCreation policy for a given namespace, overriding broker settings. When autoSubscriptionCreationOverride is enabled, new subscriptions will be created upon connection, regardless of the broker level configuration. Request example:{ "allowAutoSubscriptionCreation" : true }
- Parameters:
namespace
- Namespace nameautoSubscriptionCreationOverride
- Override policies for auto subscription creation- Throws:
PulsarAdminException.NotAuthorizedException
- Don't have admin permissionPulsarAdminException.NotFoundException
- Namespace does not existPulsarAdminException
- Unexpected error
-
setAutoSubscriptionCreationAsync
CompletableFuture<Void> setAutoSubscriptionCreationAsync(String namespace, AutoSubscriptionCreationOverride autoSubscriptionCreationOverride) Sets the autoSubscriptionCreation policy for a given namespace, overriding broker settings asynchronously. When autoSubscriptionCreationOverride is enabled, new subscriptions will be created upon connection, regardless of the broker level configuration. Request example:{ "allowAutoSubscriptionCreation" : true }
- Parameters:
namespace
- Namespace nameautoSubscriptionCreationOverride
- Override policies for auto subscription creation
-
getAutoSubscriptionCreation
AutoSubscriptionCreationOverride getAutoSubscriptionCreation(String namespace) throws PulsarAdminException Get the autoSubscriptionCreation info within a namespace.- Parameters:
namespace
-- Returns:
- Throws:
PulsarAdminException
-
getAutoSubscriptionCreationAsync
CompletableFuture<AutoSubscriptionCreationOverride> getAutoSubscriptionCreationAsync(String namespace) Get the autoSubscriptionCreation info within a namespace asynchronously.- Parameters:
namespace
-- Returns:
-
setSubscriptionTypesEnabled
void setSubscriptionTypesEnabled(String namespace, Set<org.apache.pulsar.client.api.SubscriptionType> subscriptionTypesEnabled) throws PulsarAdminException Sets the subscriptionTypesEnabled policy for a given namespace, overriding broker settings. Request example:{ "subscriptionTypesEnabled" : {"Shared", "Failover"} }
- Parameters:
namespace
- Namespace namesubscriptionTypesEnabled
- is enable subscription types- Throws:
PulsarAdminException.NotAuthorizedException
- Don't have admin permissionPulsarAdminException.NotFoundException
- Namespace does not existPulsarAdminException
- Unexpected error
-
setSubscriptionTypesEnabledAsync
CompletableFuture<Void> setSubscriptionTypesEnabledAsync(String namespace, Set<org.apache.pulsar.client.api.SubscriptionType> subscriptionTypesEnabled) Sets the subscriptionTypesEnabled policy for a given namespace, overriding broker settings. Request example:{ "subscriptionTypesEnabled" : {"Shared", "Failover"} }
- Parameters:
namespace
- Namespace namesubscriptionTypesEnabled
- is enable subscription types
-
getSubscriptionTypesEnabled
Set<org.apache.pulsar.client.api.SubscriptionType> getSubscriptionTypesEnabled(String namespace) throws PulsarAdminException Get the subscriptionTypesEnabled policy for a given namespace, overriding broker settings.- Parameters:
namespace
- Namespace name- Returns:
- subscription types
Set<org.apache.pulsar.client.api.SubscriptionType>
the subscription types - Throws:
PulsarAdminException.NotAuthorizedException
- Don't have admin permissionPulsarAdminException.NotFoundException
- Namespace does not existPulsarAdminException
- Unexpected error
-
getSubscriptionTypesEnabledAsync
CompletableFuture<Set<org.apache.pulsar.client.api.SubscriptionType>> getSubscriptionTypesEnabledAsync(String namespace) Get the subscriptionTypesEnabled policy for a given namespace, overriding broker settings.- Parameters:
namespace
- Namespace name- Returns:
- the future of subscription types
Set<org.apache.pulsar.client.api.SubscriptionType>
the subscription types
-
removeSubscriptionTypesEnabled
Removes the subscriptionTypesEnabled policy for a given namespace.- Parameters:
namespace
- Namespace name- Throws:
PulsarAdminException.NotAuthorizedException
- Don't have admin permissionPulsarAdminException.NotFoundException
- Namespace does not existPulsarAdminException
- Unexpected error
-
removeSubscriptionTypesEnabledAsync
Removes the subscriptionTypesEnabled policy for a given namespace.- Parameters:
namespace
- Namespace name- Returns:
-
removeAutoSubscriptionCreation
Removes the autoSubscriptionCreation policy for a given namespace. Allowing the broker to dictate the subscription auto-creation policy.- Parameters:
namespace
- Namespace name- Throws:
PulsarAdminException.NotAuthorizedException
- Don't have admin permissionPulsarAdminException.NotFoundException
- Namespace does not existPulsarAdminException
- Unexpected error
-
removeAutoSubscriptionCreationAsync
Removes the autoSubscriptionCreation policy for a given namespace asynchronously. Allowing the broker to dictate the subscription auto-creation policy.- Parameters:
namespace
- Namespace name
-
getBacklogQuotaMap
Map<BacklogQuota.BacklogQuotaType,BacklogQuota> getBacklogQuotaMap(String namespace) throws PulsarAdminException Get backlog quota map on a namespace. Get backlog quota map on a namespace. Response example:{ "namespace_memory" : { "limit" : "134217728", "policy" : "consumer_backlog_eviction" }, "destination_storage" : { "limit" : "-1", "policy" : "producer_exception" } }
- Parameters:
namespace
- Namespace name- Throws:
PulsarAdminException.NotAuthorizedException
- Permission deniedPulsarAdminException.NotFoundException
- Namespace does not existPulsarAdminException
- Unexpected error
-
getBacklogQuotaMapAsync
CompletableFuture<Map<BacklogQuota.BacklogQuotaType,BacklogQuota>> getBacklogQuotaMapAsync(String namespace) Get backlog quota map on a namespace asynchronously. Get backlog quota map on a namespace. Response example:{ "namespace_memory" : { "limit" : "134217728", "policy" : "consumer_backlog_eviction" }, "destination_storage" : { "limit" : "-1", "policy" : "producer_exception" } }
- Parameters:
namespace
- Namespace name
-
setBacklogQuota
void setBacklogQuota(String namespace, BacklogQuota backlogQuota, BacklogQuota.BacklogQuotaType backlogQuotaType) throws PulsarAdminException Set a backlog quota for all the topics on a namespace. Set a backlog quota on a namespace. The backlog quota can be set on this resource: Request parameter example:{ "limit" : "134217728", "policy" : "consumer_backlog_eviction" }
- Parameters:
namespace
- Namespace namebacklogQuota
- the new BacklogQuota- Throws:
PulsarAdminException.NotAuthorizedException
- Don't have admin permissionPulsarAdminException.NotFoundException
- Namespace does not existPulsarAdminException
- Unexpected error
-
setBacklogQuota
default void setBacklogQuota(String namespace, BacklogQuota backlogQuota) throws PulsarAdminException - Throws:
PulsarAdminException
-
setBacklogQuotaAsync
CompletableFuture<Void> setBacklogQuotaAsync(String namespace, BacklogQuota backlogQuota, BacklogQuota.BacklogQuotaType backlogQuotaType) Set a backlog quota for all the topics on a namespace asynchronously. Set a backlog quota on a namespace. The backlog quota can be set on this resource: Request parameter example:{ "limit" : "134217728", "policy" : "consumer_backlog_eviction" }
- Parameters:
namespace
- Namespace namebacklogQuota
- the new BacklogQuota
-
setBacklogQuotaAsync
-
removeBacklogQuota
void removeBacklogQuota(String namespace, BacklogQuota.BacklogQuotaType backlogQuotaType) throws PulsarAdminException Remove a backlog quota policy from a namespace. Remove a backlog quota policy from a namespace. The backlog retention policy will fall back to the default.- Parameters:
namespace
- Namespace name- Throws:
PulsarAdminException.NotAuthorizedException
- Don't have admin permissionPulsarAdminException.NotFoundException
- Namespace does not existPulsarAdminException
- Unexpected error
-
removeBacklogQuota
- Throws:
PulsarAdminException
-
removeBacklogQuotaAsync
CompletableFuture<Void> removeBacklogQuotaAsync(String namespace, BacklogQuota.BacklogQuotaType backlogQuotaType) Remove a backlog quota policy from a namespace asynchronously. Remove a backlog quota policy from a namespace. The backlog retention policy will fall back to the default.- Parameters:
namespace
- Namespace name
-
removeBacklogQuotaAsync
-
removePersistence
Remove the persistence configuration on a namespace.- Parameters:
namespace
-- Throws:
PulsarAdminException
-
removePersistenceAsync
Remove the persistence configuration on a namespace asynchronously.- Parameters:
namespace
-
-
setPersistence
Set the persistence configuration for all the topics on a namespace. Set the persistence configuration on a namespace. Request parameter example:{ "bookkeeperEnsemble" : 3, // Number of bookies to use for a topic "bookkeeperWriteQuorum" : 2, // How many writes to make of each entry "bookkeeperAckQuorum" : 2, // Number of acks (guaranteed copies) to wait for each entry "managedLedgerMaxMarkDeleteRate" : 10.0, // Throttling rate of mark-delete operation // to avoid high number of updates for each // consumer }
- Parameters:
namespace
- Namespace namepersistence
- Persistence policies object- Throws:
PulsarAdminException.NotAuthorizedException
- Don't have admin permissionPulsarAdminException.NotFoundException
- Namespace does not existPulsarAdminException.ConflictException
- Concurrent modificationPulsarAdminException
- Unexpected error
-
setPersistenceAsync
Set the persistence configuration for all the topics on a namespace asynchronously. Set the persistence configuration on a namespace. Request parameter example:{ "bookkeeperEnsemble" : 3, // Number of bookies to use for a topic "bookkeeperWriteQuorum" : 2, // How many writes to make of each entry "bookkeeperAckQuorum" : 2, // Number of acks (guaranteed copies) to wait for each entry "managedLedgerMaxMarkDeleteRate" : 10.0, // Throttling rate of mark-delete operation // to avoid high number of updates for each // consumer }
- Parameters:
namespace
- Namespace namepersistence
- Persistence policies object
-
getPersistence
Get the persistence configuration for a namespace. Get the persistence configuration for a namespace. Response example:{ "bookkeeperEnsemble" : 3, // Number of bookies to use for a topic "bookkeeperWriteQuorum" : 2, // How many writes to make of each entry "bookkeeperAckQuorum" : 2, // Number of acks (guaranteed copies) to wait for each entry "managedLedgerMaxMarkDeleteRate" : 10.0, // Throttling rate of mark-delete operation // to avoid high number of updates for each // consumer }
- Parameters:
namespace
- Namespace name- Throws:
PulsarAdminException.NotAuthorizedException
- Don't have admin permissionPulsarAdminException.NotFoundException
- Namespace does not existPulsarAdminException.ConflictException
- Concurrent modificationPulsarAdminException
- Unexpected error
-
getPersistenceAsync
Get the persistence configuration for a namespace asynchronously. Get the persistence configuration for a namespace. Response example:{ "bookkeeperEnsemble" : 3, // Number of bookies to use for a topic "bookkeeperWriteQuorum" : 2, // How many writes to make of each entry "bookkeeperAckQuorum" : 2, // Number of acks (guaranteed copies) to wait for each entry "managedLedgerMaxMarkDeleteRate" : 10.0, // Throttling rate of mark-delete operation // to avoid high number of updates for each // consumer }
- Parameters:
namespace
- Namespace name
-
setBookieAffinityGroup
void setBookieAffinityGroup(String namespace, BookieAffinityGroupData bookieAffinityGroup) throws PulsarAdminException Set bookie affinity group for a namespace to isolate namespace write to bookies that are part of given affinity group.- Parameters:
namespace
- namespace namebookieAffinityGroup
- bookie affinity group- Throws:
PulsarAdminException
-
setBookieAffinityGroupAsync
CompletableFuture<Void> setBookieAffinityGroupAsync(String namespace, BookieAffinityGroupData bookieAffinityGroup) Set bookie affinity group for a namespace to isolate namespace write to bookies that are part of given affinity group asynchronously.- Parameters:
namespace
- namespace namebookieAffinityGroup
- bookie affinity group
-
deleteBookieAffinityGroup
Delete bookie affinity group configured for a namespace.- Parameters:
namespace
-- Throws:
PulsarAdminException
-
deleteBookieAffinityGroupAsync
Delete bookie affinity group configured for a namespace asynchronously.- Parameters:
namespace
-
-
getBookieAffinityGroup
Get bookie affinity group configured for a namespace.- Parameters:
namespace
-- Returns:
- Throws:
PulsarAdminException
-
getBookieAffinityGroupAsync
Get bookie affinity group configured for a namespace asynchronously.- Parameters:
namespace
-- Returns:
-
setRetention
Set the retention configuration for all the topics on a namespace. Set the retention configuration on a namespace. This operation requires Pulsar super-user access. Request parameter example:{ "retentionTimeInMinutes" : 60, // how long to retain messages "retentionSizeInMB" : 1024, // retention backlog limit }
- Parameters:
namespace
- Namespace name- Throws:
PulsarAdminException.NotAuthorizedException
- Don't have admin permissionPulsarAdminException.NotFoundException
- Namespace does not existPulsarAdminException.ConflictException
- Concurrent modificationPulsarAdminException
- Unexpected error
-
setRetentionAsync
Set the retention configuration for all the topics on a namespace asynchronously. Set the retention configuration on a namespace. This operation requires Pulsar super-user access. Request parameter example:{ "retentionTimeInMinutes" : 60, // how long to retain messages "retentionSizeInMB" : 1024, // retention backlog limit }
- Parameters:
namespace
- Namespace name
-
removeRetention
Remove the retention configuration for all the topics on a namespace.- Parameters:
namespace
-- Throws:
PulsarAdminException
-
removeRetentionAsync
Remove the retention configuration for all the topics on a namespace asynchronously.- Parameters:
namespace
-- Returns:
-
getRetention
Get the retention configuration for a namespace. Get the retention configuration for a namespace. Response example:{ "retentionTimeInMinutes" : 60, // how long to retain messages "retentionSizeInMB" : 1024, // retention backlog limit }
- Parameters:
namespace
- Namespace name- Throws:
PulsarAdminException.NotAuthorizedException
- Don't have admin permissionPulsarAdminException.NotFoundException
- Namespace does not existPulsarAdminException.ConflictException
- Concurrent modificationPulsarAdminException
- Unexpected error
-
getRetentionAsync
Get the retention configuration for a namespace asynchronously. Get the retention configuration for a namespace. Response example:{ "retentionTimeInMinutes" : 60, // how long to retain messages "retentionSizeInMB" : 1024, // retention backlog limit }
- Parameters:
namespace
- Namespace name
-
unload
Unload a namespace from the current serving broker.- Parameters:
namespace
- Namespace name- Throws:
PulsarAdminException.NotAuthorizedException
- Don't have admin permissionPulsarAdminException.NotFoundException
- Namespace does not existPulsarAdminException.PreconditionFailedException
- Namespace is already unloadedPulsarAdminException
- Unexpected error
-
unloadAsync
Unload a namespace from the current serving broker asynchronously.- Parameters:
namespace
- Namespace name
-
getReplicationConfigVersion
Get the replication configuration version for a given namespace.- Parameters:
namespace
-- Returns:
- Replication configuration version
- Throws:
PulsarAdminException
- Unexpected error
-
getReplicationConfigVersionAsync
Get the replication configuration version for a given namespace asynchronously.- Parameters:
namespace
-- Returns:
- Replication configuration version
-
unloadNamespaceBundle
Unload namespace bundle.- Parameters:
namespace
-bundle
- range of bundle to unload- Throws:
PulsarAdminException
- Unexpected error
-
unloadNamespaceBundle
void unloadNamespaceBundle(String namespace, String bundle, String destinationBroker) throws PulsarAdminException Unload namespace bundle and assign the bundle to specified broker.- Parameters:
namespace
-bundle
- range of bundle to unloaddestinationBroker
- Target broker url to which the bundle should be assigned to- Throws:
PulsarAdminException
- Unexpected error
-
unloadNamespaceBundleAsync
Unload namespace bundle asynchronously.- Parameters:
namespace
-bundle
- range of bundle to unload- Returns:
- a future that can be used to track when the bundle is unloaded
-
unloadNamespaceBundleAsync
CompletableFuture<Void> unloadNamespaceBundleAsync(String namespace, String bundle, String destinationBroker) Unload namespace bundle asynchronously.- Parameters:
namespace
-bundle
- range of bundle to unloaddestinationBroker
- Target broker url to which the bundle should be assigned to- Returns:
- a future that can be used to track when the bundle is unloaded
-
splitNamespaceBundle
void splitNamespaceBundle(String namespace, String bundle, boolean unloadSplitBundles, String splitAlgorithmName) throws PulsarAdminException Split namespace bundle.- Parameters:
namespace
-bundle
- range of bundle to splitunloadSplitBundles
-splitAlgorithmName
-- Throws:
PulsarAdminException
-
splitNamespaceBundleAsync
CompletableFuture<Void> splitNamespaceBundleAsync(String namespace, String bundle, boolean unloadSplitBundles, String splitAlgorithmName) Split namespace bundle asynchronously.- Parameters:
namespace
-bundle
- range of bundle to splitunloadSplitBundles
-splitAlgorithmName
-
-
splitNamespaceBundle
void splitNamespaceBundle(String namespace, String bundle, boolean unloadSplitBundles, String splitAlgorithmName, List<Long> splitBoundaries) throws PulsarAdminException Split namespace bundle.- Parameters:
namespace
-bundle
- range of bundle to splitunloadSplitBundles
-splitAlgorithmName
-splitBoundaries
-- Throws:
PulsarAdminException
-
splitNamespaceBundleAsync
CompletableFuture<Void> splitNamespaceBundleAsync(String namespace, String bundle, boolean unloadSplitBundles, String splitAlgorithmName, List<Long> splitBoundaries) Split namespace bundle asynchronously.- Parameters:
namespace
-bundle
- range of bundle to splitunloadSplitBundles
-splitAlgorithmName
-splitBoundaries
-
-
getTopicHashPositions
TopicHashPositions getTopicHashPositions(String namespace, String bundle, List<String> topics) throws PulsarAdminException Get positions for topic list in a bundle.- Parameters:
namespace
-bundle
- range of bundletopics
-- Returns:
- hash positions for all topics in topicList
- Throws:
PulsarAdminException
-
getTopicHashPositionsAsync
CompletableFuture<TopicHashPositions> getTopicHashPositionsAsync(String namespace, String bundle, List<String> topics) Get positions for topic list in a bundle.- Parameters:
namespace
-bundle
- range of bundletopics
-- Returns:
- hash positions for all topics in topicList
- Throws:
PulsarAdminException
-
setPublishRate
Set message-publish-rate (topics under this namespace can publish this many messages per second).- Parameters:
namespace
-publishMsgRate
- number of messages per second- Throws:
PulsarAdminException
- Unexpected error
-
removePublishRate
Remove message-publish-rate (topics under this namespace can publish this many messages per second).- Parameters:
namespace
-- Throws:
PulsarAdminException
- Unexpected error
-
setPublishRateAsync
Set message-publish-rate (topics under this namespace can publish this many messages per second) asynchronously.- Parameters:
namespace
-publishMsgRate
- number of messages per second
-
removePublishRateAsync
Remove message-publish-rate asynchronously. topics under this namespace can publish this many messages per second- Parameters:
namespace
-
-
getPublishRate
Get message-publish-rate (topics under this namespace can publish this many messages per second).- Parameters:
namespace
-- Returns:
- number of messages per second
- Throws:
PulsarAdminException
- Unexpected error
-
getPublishRateAsync
Get message-publish-rate (topics under this namespace can publish this many messages per second) asynchronously.- Parameters:
namespace
-- Returns:
- number of messages per second
-
removeDispatchRate
Remove message-dispatch-rate.- Parameters:
namespace
-- Throws:
PulsarAdminException
-
removeDispatchRateAsync
Remove message-dispatch-rate asynchronously.- Parameters:
namespace
-- Returns:
-
setDispatchRate
Set message-dispatch-rate (topics under this namespace can dispatch this many messages per second).- Parameters:
namespace
-dispatchRate
- number of messages per second- Throws:
PulsarAdminException
- Unexpected error
-
setDispatchRateAsync
Set message-dispatch-rate asynchronously. topics under this namespace can dispatch this many messages per second- Parameters:
namespace
-dispatchRate
- number of messages per second
-
getDispatchRate
Get message-dispatch-rate (topics under this namespace can dispatch this many messages per second).- Parameters:
namespace
-- Throws:
PulsarAdminException
- Unexpected error
-
getDispatchRateAsync
Get message-dispatch-rate asynchronously. Topics under this namespace can dispatch this many messages per second.- Parameters:
namespace
-
-
setSubscribeRate
Set namespace-subscribe-rate (topics under this namespace will limit by subscribeRate).- Parameters:
namespace
-subscribeRate
- consumer subscribe limit by this subscribeRate- Throws:
PulsarAdminException
- Unexpected error
-
setSubscribeRateAsync
Set namespace-subscribe-rate (topics under this namespace will limit by subscribeRate) asynchronously.- Parameters:
namespace
-subscribeRate
- consumer subscribe limit by this subscribeRate
-
removeSubscribeRate
Remove namespace-subscribe-rate (topics under this namespace will limit by subscribeRate).- Parameters:
namespace
-- Throws:
PulsarAdminException
-
removeSubscribeRateAsync
Remove namespace-subscribe-rate (topics under this namespace will limit by subscribeRate) asynchronously.- Parameters:
namespace
-
-
getSubscribeRate
Get namespace-subscribe-rate (topics under this namespace allow subscribe times per consumer in a period).- Parameters:
namespace
-- Throws:
PulsarAdminException
- Unexpected error
-
getSubscribeRateAsync
Get namespace-subscribe-rate asynchronously. Topics under this namespace allow subscribe times per consumer in a period.- Parameters:
namespace
-
-
removeSubscriptionDispatchRate
Remove subscription-message-dispatch-rate.- Parameters:
namespace
-- Throws:
PulsarAdminException
-
removeSubscriptionDispatchRateAsync
Remove subscription-message-dispatch-rate asynchronously.- Parameters:
namespace
-- Returns:
-
setSubscriptionDispatchRate
void setSubscriptionDispatchRate(String namespace, DispatchRate dispatchRate) throws PulsarAdminException Set subscription-message-dispatch-rate. Subscriptions under this namespace can dispatch this many messages per second- Parameters:
namespace
-dispatchRate
- number of messages per second- Throws:
PulsarAdminException
- Unexpected error
-
setSubscriptionDispatchRateAsync
CompletableFuture<Void> setSubscriptionDispatchRateAsync(String namespace, DispatchRate dispatchRate) Set subscription-message-dispatch-rate asynchronously. Subscriptions under this namespace can dispatch this many messages per second.- Parameters:
namespace
-dispatchRate
- number of messages per second
-
getSubscriptionDispatchRate
Get subscription-message-dispatch-rate. Subscriptions under this namespace can dispatch this many messages per second.- Parameters:
namespace
-- Throws:
PulsarAdminException
- Unexpected error
-
getSubscriptionDispatchRateAsync
Get subscription-message-dispatch-rate asynchronously. Subscriptions under this namespace can dispatch this many messages per second.- Parameters:
namespace
-
-
setReplicatorDispatchRate
void setReplicatorDispatchRate(String namespace, DispatchRate dispatchRate) throws PulsarAdminException Set replicator-message-dispatch-rate. Replicators under this namespace can dispatch this many messages per second.- Parameters:
namespace
-dispatchRate
- number of messages per second- Throws:
PulsarAdminException
- Unexpected error
-
setReplicatorDispatchRateAsync
Set replicator-message-dispatch-rate asynchronously. Replicators under this namespace can dispatch this many messages per second.- Parameters:
namespace
-dispatchRate
- number of messages per second
-
removeReplicatorDispatchRate
Remove replicator-message-dispatch-rate.- Parameters:
namespace
-- Throws:
PulsarAdminException
- Unexpected error
-
removeReplicatorDispatchRateAsync
Set replicator-message-dispatch-rate asynchronously.- Parameters:
namespace
-
-
getReplicatorDispatchRate
Get replicator-message-dispatch-rate. Replicators under this namespace can dispatch this many messages per second.- Parameters:
namespace
-- Throws:
PulsarAdminException
- Unexpected error
-
getReplicatorDispatchRateAsync
Get replicator-message-dispatch-rate asynchronously. Replicators under this namespace can dispatch this many messages per second.- Parameters:
namespace
-
-
clearNamespaceBacklog
Clear backlog for all topics on a namespace.- Parameters:
namespace
-- Throws:
PulsarAdminException
- Unexpected error
-
clearNamespaceBacklogAsync
Clear backlog for all topics on a namespace asynchronously.- Parameters:
namespace
-
-
clearNamespaceBacklogForSubscription
void clearNamespaceBacklogForSubscription(String namespace, String subscription) throws PulsarAdminException Clear backlog for a given subscription on all topics on a namespace.- Parameters:
namespace
-subscription
-- Throws:
PulsarAdminException
- Unexpected error
-
clearNamespaceBacklogForSubscriptionAsync
CompletableFuture<Void> clearNamespaceBacklogForSubscriptionAsync(String namespace, String subscription) Clear backlog for a given subscription on all topics on a namespace asynchronously.- Parameters:
namespace
-subscription
-
-
clearNamespaceBundleBacklog
Clear backlog for all topics on a namespace bundle.- Parameters:
namespace
-bundle
-- Throws:
PulsarAdminException
- Unexpected error
-
clearNamespaceBundleBacklogAsync
Clear backlog for all topics on a namespace bundle asynchronously.- Parameters:
namespace
-bundle
-- Returns:
- a future that can be used to track when the bundle is cleared
-
clearNamespaceBundleBacklogForSubscription
void clearNamespaceBundleBacklogForSubscription(String namespace, String bundle, String subscription) throws PulsarAdminException Clear backlog for a given subscription on all topics on a namespace bundle.- Parameters:
namespace
-bundle
-subscription
-- Throws:
PulsarAdminException
- Unexpected error
-
clearNamespaceBundleBacklogForSubscriptionAsync
CompletableFuture<Void> clearNamespaceBundleBacklogForSubscriptionAsync(String namespace, String bundle, String subscription) Clear backlog for a given subscription on all topics on a namespace bundle asynchronously.- Parameters:
namespace
-bundle
-subscription
-- Returns:
- a future that can be used to track when the bundle is cleared
-
unsubscribeNamespace
Unsubscribe the given subscription on all topics on a namespace.- Parameters:
namespace
-subscription
-- Throws:
PulsarAdminException
-
unsubscribeNamespaceAsync
Unsubscribe the given subscription on all topics on a namespace asynchronously.- Parameters:
namespace
-subscription
-
-
unsubscribeNamespaceBundle
void unsubscribeNamespaceBundle(String namespace, String bundle, String subscription) throws PulsarAdminException Unsubscribe the given subscription on all topics on a namespace bundle.- Parameters:
namespace
-bundle
-subscription
-- Throws:
PulsarAdminException
-
unsubscribeNamespaceBundleAsync
CompletableFuture<Void> unsubscribeNamespaceBundleAsync(String namespace, String bundle, String subscription) Unsubscribe the given subscription on all topics on a namespace bundle asynchronously.- Parameters:
namespace
-bundle
-subscription
-- Returns:
- a future that can be used to track when the subscription is unsubscribed
-
setEncryptionRequiredStatus
void setEncryptionRequiredStatus(String namespace, boolean encryptionRequired) throws PulsarAdminException Set the encryption required status for all topics within a namespace. When encryption required is true, the broker will prevent to store unencrypted messages. Request example:true
- Parameters:
namespace
- Namespace nameencryptionRequired
- whether message encryption is required or not- Throws:
PulsarAdminException.NotAuthorizedException
- Don't have admin permissionPulsarAdminException.NotFoundException
- Namespace does not existPulsarAdminException
- Unexpected error
-
getEncryptionRequiredStatus
Get the encryption required status within a namespace.- Parameters:
namespace
-- Returns:
- Throws:
PulsarAdminException
-
getEncryptionRequiredStatusAsync
Get the encryption required status within a namespace asynchronously.- Parameters:
namespace
-- Returns:
-
setEncryptionRequiredStatusAsync
CompletableFuture<Void> setEncryptionRequiredStatusAsync(String namespace, boolean encryptionRequired) Set the encryption required status for all topics within a namespace asynchronously. When encryption required is true, the broker will prevent to store unencrypted messages. Request example:true
- Parameters:
namespace
- Namespace nameencryptionRequired
- whether message encryption is required or not
-
getDelayedDelivery
Get the delayed delivery messages for all topics within a namespace. If disabled, messages will be immediately delivered and there will be no tracking overhead. Request example:{ "active" : true, // Enable or disable delayed delivery for messages on a namespace "tickTime" : 1000, // The tick time for when retrying on delayed delivery messages }
- Parameters:
namespace
- Namespace name- Returns:
- delayedDeliveryPolicies Whether to enable the delayed delivery for messages.
- Throws:
PulsarAdminException.NotAuthorizedException
- Don't have admin permissionPulsarAdminException.NotFoundException
- Namespace does not existPulsarAdminException
- Unexpected error
-
getDelayedDeliveryAsync
Get the delayed delivery messages for all topics within a namespace asynchronously. If disabled, messages will be immediately delivered and there will be no tracking overhead. Request example:{ "active" : true, // Enable or disable delayed delivery for messages on a namespace "tickTime" : 1000, // The tick time for when retrying on delayed delivery messages }
- Parameters:
namespace
- Namespace name- Returns:
- delayedDeliveryPolicies Whether to enable the delayed delivery for messages.
-
setDelayedDeliveryMessages
void setDelayedDeliveryMessages(String namespace, DelayedDeliveryPolicies delayedDeliveryPolicies) throws PulsarAdminException Set the delayed delivery messages for all topics within a namespace. If disabled, messages will be immediately delivered and there will be no tracking overhead. Request example:{ "tickTime" : 1000, // Enable or disable delayed delivery for messages on a namespace "active" : true, // The tick time for when retrying on delayed delivery messages }
- Parameters:
namespace
- Namespace namedelayedDeliveryPolicies
- Whether to enable the delayed delivery for messages.- Throws:
PulsarAdminException.NotAuthorizedException
- Don't have admin permissionPulsarAdminException.NotFoundException
- Namespace does not existPulsarAdminException
- Unexpected error
-
setDelayedDeliveryMessagesAsync
CompletableFuture<Void> setDelayedDeliveryMessagesAsync(String namespace, DelayedDeliveryPolicies delayedDeliveryPolicies) Set the delayed delivery messages for all topics within a namespace asynchronously. If disabled, messages will be immediately delivered and there will be no tracking overhead. Request example:{ "tickTime" : 1000, // Enable or disable delayed delivery for messages on a namespace "active" : true, // The tick time for when retrying on delayed delivery messages }
- Parameters:
namespace
- Namespace namedelayedDeliveryPolicies
- Whether to enable the delayed delivery for messages.
-
removeDelayedDeliveryMessages
Remove the delayed delivery messages for all topics within a namespace.- Parameters:
namespace
-- Throws:
PulsarAdminException
-
removeDelayedDeliveryMessagesAsync
Remove the delayed delivery messages for all topics within a namespace asynchronously.- Parameters:
namespace
-- Returns:
-
getInactiveTopicPolicies
Get the inactive deletion strategy for all topics within a namespace synchronously.- Parameters:
namespace
-- Returns:
- Throws:
PulsarAdminException
-
removeInactiveTopicPoliciesAsync
remove InactiveTopicPolicies from a namespace asynchronously.- Parameters:
namespace
-- Returns:
-
removeInactiveTopicPolicies
Remove inactive topic policies from a namespace.- Parameters:
namespace
-- Throws:
PulsarAdminException
-
getInactiveTopicPoliciesAsync
Get the inactive deletion strategy for all topics within a namespace asynchronously.- Parameters:
namespace
-- Returns:
-
setInactiveTopicPolicies
void setInactiveTopicPolicies(String namespace, InactiveTopicPolicies inactiveTopicPolicies) throws PulsarAdminException As same as setInactiveTopicPoliciesAsync, but it is synchronous.- Parameters:
namespace
-inactiveTopicPolicies
-- Throws:
PulsarAdminException
-
setInactiveTopicPoliciesAsync
CompletableFuture<Void> setInactiveTopicPoliciesAsync(String namespace, InactiveTopicPolicies inactiveTopicPolicies) You can set the inactive deletion strategy at the namespace level. Its priority is higher than the inactive deletion strategy at the broker level. All topics under this namespace will follow this strategy.- Parameters:
namespace
-inactiveTopicPolicies
-- Returns:
-
setSubscriptionAuthMode
void setSubscriptionAuthMode(String namespace, SubscriptionAuthMode subscriptionAuthMode) throws PulsarAdminException Set the given subscription auth mode on all topics on a namespace.- Parameters:
namespace
-subscriptionAuthMode
-- Throws:
PulsarAdminException
-
setSubscriptionAuthModeAsync
CompletableFuture<Void> setSubscriptionAuthModeAsync(String namespace, SubscriptionAuthMode subscriptionAuthMode) Set the given subscription auth mode on all topics on a namespace asynchronously.- Parameters:
namespace
-subscriptionAuthMode
-
-
getSubscriptionAuthMode
Get the subscriptionAuthMode within a namespace.- Parameters:
namespace
-- Returns:
- Throws:
PulsarAdminException
-
getSubscriptionAuthModeAsync
Get the subscriptionAuthMode within a namespace asynchronously.- Parameters:
namespace
-- Returns:
-
getDeduplicationSnapshotInterval
Get the deduplicationSnapshotInterval for a namespace.- Parameters:
namespace
-- Returns:
- Throws:
PulsarAdminException
-
getDeduplicationSnapshotIntervalAsync
Get the deduplicationSnapshotInterval for a namespace asynchronously.- Parameters:
namespace
-- Returns:
-
setDeduplicationSnapshotInterval
void setDeduplicationSnapshotInterval(String namespace, Integer interval) throws PulsarAdminException Set the deduplicationSnapshotInterval for a namespace.- Parameters:
namespace
-interval
-- Throws:
PulsarAdminException
-
setDeduplicationSnapshotIntervalAsync
Set the deduplicationSnapshotInterval for a namespace asynchronously.- Parameters:
namespace
-interval
-- Returns:
-
removeDeduplicationSnapshotInterval
Remove the deduplicationSnapshotInterval for a namespace.- Parameters:
namespace
-- Throws:
PulsarAdminException
-
removeDeduplicationSnapshotIntervalAsync
Remove the deduplicationSnapshotInterval for a namespace asynchronously.- Parameters:
namespace
-- Returns:
-
getMaxSubscriptionsPerTopic
Get the maxSubscriptionsPerTopic for a namespace.- Parameters:
namespace
-- Returns:
- Throws:
PulsarAdminException
-
getMaxSubscriptionsPerTopicAsync
Get the maxSubscriptionsPerTopic for a namespace asynchronously.- Parameters:
namespace
-- Returns:
-
setMaxSubscriptionsPerTopic
void setMaxSubscriptionsPerTopic(String namespace, int maxSubscriptionsPerTopic) throws PulsarAdminException Set the maxSubscriptionsPerTopic for a namespace.- Parameters:
namespace
-maxSubscriptionsPerTopic
-- Throws:
PulsarAdminException
-
setMaxSubscriptionsPerTopicAsync
CompletableFuture<Void> setMaxSubscriptionsPerTopicAsync(String namespace, int maxSubscriptionsPerTopic) Set the maxSubscriptionsPerTopic for a namespace asynchronously.- Parameters:
namespace
-maxSubscriptionsPerTopic
-- Returns:
-
removeMaxSubscriptionsPerTopic
Remove the maxSubscriptionsPerTopic for a namespace.- Parameters:
namespace
-- Throws:
PulsarAdminException
-
removeMaxSubscriptionsPerTopicAsync
Remove the maxSubscriptionsPerTopic for a namespace asynchronously.- Parameters:
namespace
-- Returns:
-
getMaxProducersPerTopic
Get the maxProducersPerTopic for a namespace. Response example:0
- Parameters:
namespace
- Namespace name- Throws:
PulsarAdminException.NotAuthorizedException
- Don't have admin permissionPulsarAdminException.NotFoundException
- Namespace does not existPulsarAdminException
- Unexpected error
-
getMaxProducersPerTopicAsync
Get the maxProducersPerTopic for a namespace asynchronously. Response example:0
- Parameters:
namespace
- Namespace name
-
setMaxProducersPerTopic
void setMaxProducersPerTopic(String namespace, int maxProducersPerTopic) throws PulsarAdminException Set maxProducersPerTopic for a namespace. Request example:10
- Parameters:
namespace
- Namespace namemaxProducersPerTopic
- maxProducersPerTopic value for a namespace- Throws:
PulsarAdminException.NotAuthorizedException
- Don't have admin permissionPulsarAdminException.NotFoundException
- Namespace does not existPulsarAdminException
- Unexpected error
-
setMaxProducersPerTopicAsync
Set maxProducersPerTopic for a namespace asynchronously. Request example:10
- Parameters:
namespace
- Namespace namemaxProducersPerTopic
- maxProducersPerTopic value for a namespace
-
removeMaxProducersPerTopic
Remove maxProducersPerTopic for a namespace.- Parameters:
namespace
- Namespace name- Throws:
PulsarAdminException.NotAuthorizedException
- Don't have admin permissionPulsarAdminException.NotFoundException
- Namespace does not existPulsarAdminException
- Unexpected error
-
removeMaxProducersPerTopicAsync
Set maxProducersPerTopic for a namespace asynchronously.- Parameters:
namespace
- Namespace name
-
getMaxConsumersPerTopic
Get the maxProducersPerTopic for a namespace. Response example:0
- Parameters:
namespace
- Namespace name- Throws:
PulsarAdminException.NotAuthorizedException
- Don't have admin permissionPulsarAdminException.NotFoundException
- Namespace does not existPulsarAdminException
- Unexpected error
-
getMaxConsumersPerTopicAsync
Get the maxProducersPerTopic for a namespace asynchronously. Response example:0
- Parameters:
namespace
- Namespace name
-
setMaxConsumersPerTopic
void setMaxConsumersPerTopic(String namespace, int maxConsumersPerTopic) throws PulsarAdminException Set maxConsumersPerTopic for a namespace. Request example:10
- Parameters:
namespace
- Namespace namemaxConsumersPerTopic
- maxConsumersPerTopic value for a namespace- Throws:
PulsarAdminException.NotAuthorizedException
- Don't have admin permissionPulsarAdminException.NotFoundException
- Namespace does not existPulsarAdminException
- Unexpected error
-
setMaxConsumersPerTopicAsync
Set maxConsumersPerTopic for a namespace asynchronously. Request example:10
- Parameters:
namespace
- Namespace namemaxConsumersPerTopic
- maxConsumersPerTopic value for a namespace
-
removeMaxConsumersPerTopic
Remove maxConsumersPerTopic for a namespace.- Parameters:
namespace
-- Throws:
PulsarAdminException
-
removeMaxConsumersPerTopicAsync
Remove maxConsumersPerTopic for a namespace asynchronously.- Parameters:
namespace
-- Returns:
-
getMaxConsumersPerSubscription
Get the maxConsumersPerSubscription for a namespace. Response example:0
- Parameters:
namespace
- Namespace name- Throws:
PulsarAdminException.NotAuthorizedException
- Don't have admin permissionPulsarAdminException.NotFoundException
- Namespace does not existPulsarAdminException
- Unexpected error
-
getMaxConsumersPerSubscriptionAsync
Get the maxConsumersPerSubscription for a namespace asynchronously. Response example:0
- Parameters:
namespace
- Namespace name
-
setMaxConsumersPerSubscription
void setMaxConsumersPerSubscription(String namespace, int maxConsumersPerSubscription) throws PulsarAdminException Set maxConsumersPerSubscription for a namespace. Request example:10
- Parameters:
namespace
- Namespace namemaxConsumersPerSubscription
- maxConsumersPerSubscription value for a namespace- Throws:
PulsarAdminException.NotAuthorizedException
- Don't have admin permissionPulsarAdminException.NotFoundException
- Namespace does not existPulsarAdminException
- Unexpected error
-
setMaxConsumersPerSubscriptionAsync
CompletableFuture<Void> setMaxConsumersPerSubscriptionAsync(String namespace, int maxConsumersPerSubscription) Set maxConsumersPerSubscription for a namespace asynchronously. Request example:10
- Parameters:
namespace
- Namespace namemaxConsumersPerSubscription
- maxConsumersPerSubscription value for a namespace
-
removeMaxConsumersPerSubscription
Remove maxConsumersPerSubscription for a namespace.- Parameters:
namespace
-- Throws:
PulsarAdminException
-
removeMaxConsumersPerSubscriptionAsync
Remove maxConsumersPerSubscription for a namespace asynchronously.- Parameters:
namespace
-- Returns:
-
getMaxUnackedMessagesPerConsumer
Get the maxUnackedMessagesPerConsumer for a namespace. Response example:0
- Parameters:
namespace
- Namespace name- Throws:
PulsarAdminException.NotAuthorizedException
- Don't have admin permissionPulsarAdminException.NotFoundException
- Namespace does not existPulsarAdminException
- Unexpected error
-
getMaxUnackedMessagesPerConsumerAsync
Get the maxUnackedMessagesPerConsumer for a namespace asynchronously. Response example:0
- Parameters:
namespace
- Namespace name
-
setMaxUnackedMessagesPerConsumer
void setMaxUnackedMessagesPerConsumer(String namespace, int maxUnackedMessagesPerConsumer) throws PulsarAdminException Set maxUnackedMessagesPerConsumer for a namespace. Request example:10
- Parameters:
namespace
- Namespace namemaxUnackedMessagesPerConsumer
- maxUnackedMessagesPerConsumer value for a namespace- Throws:
PulsarAdminException.NotAuthorizedException
- Don't have admin permissionPulsarAdminException.NotFoundException
- Namespace does not existPulsarAdminException
- Unexpected error
-
setMaxUnackedMessagesPerConsumerAsync
CompletableFuture<Void> setMaxUnackedMessagesPerConsumerAsync(String namespace, int maxUnackedMessagesPerConsumer) Set maxUnackedMessagesPerConsumer for a namespace asynchronously. Request example:10
- Parameters:
namespace
- Namespace namemaxUnackedMessagesPerConsumer
- maxUnackedMessagesPerConsumer value for a namespace
-
removeMaxUnackedMessagesPerConsumer
Remove maxUnackedMessagesPerConsumer for a namespace.- Parameters:
namespace
-- Throws:
PulsarAdminException
-
removeMaxUnackedMessagesPerConsumerAsync
Remove maxUnackedMessagesPerConsumer for a namespace asynchronously.- Parameters:
namespace
-- Returns:
-
getMaxUnackedMessagesPerSubscription
Get the maxUnackedMessagesPerSubscription for a namespace. Response example:0
- Parameters:
namespace
- Namespace name- Throws:
PulsarAdminException.NotAuthorizedException
- Don't have admin permissionPulsarAdminException.NotFoundException
- Namespace does not existPulsarAdminException
- Unexpected error
-
getMaxUnackedMessagesPerSubscriptionAsync
Get the maxUnackedMessagesPerSubscription for a namespace asynchronously. Response example:0
- Parameters:
namespace
- Namespace name
-
setMaxUnackedMessagesPerSubscription
void setMaxUnackedMessagesPerSubscription(String namespace, int maxUnackedMessagesPerSubscription) throws PulsarAdminException Set maxUnackedMessagesPerSubscription for a namespace. Request example:10
- Parameters:
namespace
- Namespace namemaxUnackedMessagesPerSubscription
- Max number of unacknowledged messages allowed per shared subscription.- Throws:
PulsarAdminException.NotAuthorizedException
- Don't have admin permissionPulsarAdminException.NotFoundException
- Namespace does not existPulsarAdminException
- Unexpected error
-
setMaxUnackedMessagesPerSubscriptionAsync
CompletableFuture<Void> setMaxUnackedMessagesPerSubscriptionAsync(String namespace, int maxUnackedMessagesPerSubscription) Set maxUnackedMessagesPerSubscription for a namespace asynchronously. Request example:10
- Parameters:
namespace
- Namespace namemaxUnackedMessagesPerSubscription
- Max number of unacknowledged messages allowed per shared subscription.
-
removeMaxUnackedMessagesPerSubscription
Remove maxUnackedMessagesPerSubscription for a namespace.- Parameters:
namespace
-- Throws:
PulsarAdminException
-
removeMaxUnackedMessagesPerSubscriptionAsync
Remove maxUnackedMessagesPerSubscription for a namespace asynchronously.- Parameters:
namespace
-- Returns:
-
getCompactionThreshold
Get the compactionThreshold for a namespace. The maximum number of bytes topics in the namespace can have before compaction is triggered. 0 disables. Response example:10000000
- Parameters:
namespace
- Namespace name- Throws:
PulsarAdminException.NotAuthorizedException
- Don't have admin permissionPulsarAdminException.NotFoundException
- Namespace does not existPulsarAdminException
- Unexpected error
-
getCompactionThresholdAsync
Get the compactionThreshold for a namespace asynchronously. The maximum number of bytes topics in the namespace can have before compaction is triggered. 0 disables. Response example:10000000
- Parameters:
namespace
- Namespace name
-
setCompactionThreshold
Set the compactionThreshold for a namespace. The maximum number of bytes topics in the namespace can have before compaction is triggered. 0 disables. Request example:10000000
- Parameters:
namespace
- Namespace namecompactionThreshold
- maximum number of backlog bytes before compaction is triggered- Throws:
PulsarAdminException.NotAuthorizedException
- Don't have admin permissionPulsarAdminException.NotFoundException
- Namespace does not existPulsarAdminException
- Unexpected error
-
setCompactionThresholdAsync
Set the compactionThreshold for a namespace asynchronously. The maximum number of bytes topics in the namespace can have before compaction is triggered. 0 disables. Request example:10000000
- Parameters:
namespace
- Namespace namecompactionThreshold
- maximum number of backlog bytes before compaction is triggered
-
removeCompactionThreshold
Delete the compactionThreshold for a namespace.- Parameters:
namespace
-- Throws:
PulsarAdminException
-
removeCompactionThresholdAsync
Delete the compactionThreshold for a namespace asynchronously.- Parameters:
namespace
-- Returns:
-
getOffloadThreshold
Get the offloadThreshold for a namespace. The maximum number of bytes stored on the pulsar cluster for topics in the namespace before data starts being offloaded to longterm storage. Response example:10000000
- Parameters:
namespace
- Namespace name- Throws:
PulsarAdminException.NotAuthorizedException
- Don't have admin permissionPulsarAdminException.NotFoundException
- Namespace does not existPulsarAdminException
- Unexpected error
-
getOffloadThresholdAsync
Get the offloadThreshold for a namespace asynchronously. The maximum number of bytes stored on the pulsar cluster for topics in the namespace before data starts being offloaded to longterm storage. Response example:10000000
- Parameters:
namespace
- Namespace name
-
getOffloadThresholdInSeconds
Get the offloadThresholdInSeconds for a namespace. Response example:10000000
- Parameters:
namespace
- Namespace name- Throws:
PulsarAdminException.NotAuthorizedException
- Don't have admin permissionPulsarAdminException.NotFoundException
- Namespace does not existPulsarAdminException
- Unexpected error
-
getOffloadThresholdInSecondsAsync
Get the offloadThresholdInSeconds for a namespace. Response example:10000000
- Parameters:
namespace
- Namespace name
-
setOffloadThreshold
Set the offloadThreshold for a namespace. The maximum number of bytes stored on the pulsar cluster for topics in the namespace before data starts being offloaded to longterm storage. Negative values disabled automatic offloading. Setting a threshold of 0 will offload data as soon as possible. Request example:10000000
- Parameters:
namespace
- Namespace nameoffloadThreshold
- maximum number of bytes stored before offloading is triggered- Throws:
PulsarAdminException.NotAuthorizedException
- Don't have admin permissionPulsarAdminException.NotFoundException
- Namespace does not existPulsarAdminException
- Unexpected error
-
setOffloadThresholdAsync
Set the offloadThreshold for a namespace asynchronously. The maximum number of bytes stored on the pulsar cluster for topics in the namespace before data starts being offloaded to longterm storage. Negative values disabled automatic offloading. Setting a threshold of 0 will offload data as soon as possible. Request example:10000000
- Parameters:
namespace
- Namespace nameoffloadThreshold
- maximum number of bytes stored before offloading is triggered
-
setOffloadThresholdInSeconds
void setOffloadThresholdInSeconds(String namespace, long offloadThresholdInSeconds) throws PulsarAdminException Set the offloadThresholdInSeconds for a namespace. Negative values disabled automatic offloading. Setting a threshold of 0 will offload data as soon as possible. Request example:10000000
- Parameters:
namespace
- Namespace nameoffloadThresholdInSeconds
- maximum number of bytes stored before offloading is triggered- Throws:
PulsarAdminException.NotAuthorizedException
- Don't have admin permissionPulsarAdminException.NotFoundException
- Namespace does not existPulsarAdminException
- Unexpected error
-
setOffloadThresholdInSecondsAsync
CompletableFuture<Void> setOffloadThresholdInSecondsAsync(String namespace, long offloadThresholdInSeconds) Set the offloadThresholdInSeconds for a namespace. Negative values disabled automatic offloading. Setting a threshold of 0 will offload data as soon as possible. Request example:10000000
- Parameters:
namespace
- Namespace nameoffloadThresholdInSeconds
- maximum number of seconds stored before offloading is triggered
-
getOffloadDeleteLagMs
Get the offload deletion lag for a namespace, in milliseconds. The number of milliseconds to wait before deleting a ledger segment which has been offloaded from the Pulsar cluster's local storage (i.e. BookKeeper). If the offload deletion lag has not been set for the namespace, the method returns 'null' and the namespace will use the configured default of the pulsar broker. A negative value disables deletion of the local ledger completely, though it will still be deleted if it exceeds the topics retention policy, along with the offloaded copy. Response example:3600000
- Parameters:
namespace
- Namespace name- Returns:
- the offload deletion lag for the namespace in milliseconds, or null if not set
- Throws:
PulsarAdminException.NotAuthorizedException
- Don't have admin permissionPulsarAdminException.NotFoundException
- Namespace does not existPulsarAdminException
- Unexpected error
-
getOffloadDeleteLagMsAsync
Get the offload deletion lag asynchronously for a namespace, in milliseconds. The number of milliseconds to wait before deleting a ledger segment which has been offloaded from the Pulsar cluster's local storage (i.e. BookKeeper). If the offload deletion lag has not been set for the namespace, the method returns 'null' and the namespace will use the configured default of the pulsar broker. A negative value disables deletion of the local ledger completely, though it will still be deleted if it exceeds the topics retention policy, along with the offloaded copy. Response example:3600000
- Parameters:
namespace
- Namespace name- Returns:
- the offload deletion lag for the namespace in milliseconds, or null if not set
-
setOffloadDeleteLag
Set the offload deletion lag for a namespace. The offload deletion lag is the amount of time to wait after offloading a ledger segment to long term storage, before deleting its copy stored on the Pulsar cluster's local storage (i.e. BookKeeper). A negative value disables deletion of the local ledger completely, though it will still be deleted if it exceeds the topics retention policy, along with the offloaded copy.- Parameters:
namespace
- Namespace namelag
- the duration to wait before deleting the local copyunit
- the timeunit of the duration- Throws:
PulsarAdminException.NotAuthorizedException
- Don't have admin permissionPulsarAdminException.NotFoundException
- Namespace does not existPulsarAdminException
- Unexpected error
-
setOffloadDeleteLagAsync
Set the offload deletion lag for a namespace asynchronously. The offload deletion lag is the amount of time to wait after offloading a ledger segment to long term storage, before deleting its copy stored on the Pulsar cluster's local storage (i.e. BookKeeper). A negative value disables deletion of the local ledger completely, though it will still be deleted if it exceeds the topics retention policy, along with the offloaded copy.- Parameters:
namespace
- Namespace namelag
- the duration to wait before deleting the local copyunit
- the timeunit of the duration
-
clearOffloadDeleteLag
Clear the offload deletion lag for a namespace. The namespace will fall back to using the configured default of the pulsar broker.- Throws:
PulsarAdminException.NotAuthorizedException
- Don't have admin permissionPulsarAdminException.NotFoundException
- Namespace does not existPulsarAdminException
- Unexpected error
-
clearOffloadDeleteLagAsync
Clear the offload deletion lag for a namespace asynchronously. The namespace will fall back to using the configured default of the pulsar broker. -
getSchemaAutoUpdateCompatibilityStrategy
@Deprecated SchemaAutoUpdateCompatibilityStrategy getSchemaAutoUpdateCompatibilityStrategy(String namespace) throws PulsarAdminException Deprecated.Get the strategy used to check the a new schema provided by a producer is compatible with the current schema before it is installed. If this isSchemaAutoUpdateCompatibilityStrategy.AutoUpdateDisabled
, then all new schemas provided via the producer are rejected, and schemas must be updated through the REST api.- Parameters:
namespace
- The namespace in whose policy we are interested- Returns:
- the strategy used to check compatibility
- Throws:
PulsarAdminException.NotAuthorizedException
- Don't have admin permissionPulsarAdminException.NotFoundException
- Namespace does not existPulsarAdminException
- Unexpected error
-
setSchemaAutoUpdateCompatibilityStrategy
@Deprecated void setSchemaAutoUpdateCompatibilityStrategy(String namespace, SchemaAutoUpdateCompatibilityStrategy strategy) throws PulsarAdminException Deprecated.Set the strategy used to check the a new schema provided by a producer is compatible with the current schema before it is installed. To disable all new schema updates through the producer, set this toSchemaAutoUpdateCompatibilityStrategy.AutoUpdateDisabled
.- Parameters:
namespace
- The namespace in whose policy should be setstrategy
-- Throws:
PulsarAdminException.NotAuthorizedException
- Don't have admin permissionPulsarAdminException.NotFoundException
- Namespace does not existPulsarAdminException
- Unexpected error
-
getSchemaValidationEnforced
Get schema validation enforced for namespace.- Parameters:
namespace
- namespace for this command.- Returns:
- the schema validation enforced flag
- Throws:
PulsarAdminException.NotAuthorizedException
- Don't have admin permissionPulsarAdminException.NotFoundException
- Tenant or Namespace does not existPulsarAdminException
- Unexpected error
-
getSchemaValidationEnforcedAsync
Get schema validation enforced for namespace asynchronously.- Parameters:
namespace
- namespace for this command.- Returns:
- the schema validation enforced flag
-
getSchemaValidationEnforced
Get schema validation enforced for namespace.- Parameters:
namespace
- namespace for this command.applied
- applied for this command.- Returns:
- the schema validation enforced flag
- Throws:
PulsarAdminException.NotAuthorizedException
- Don't have admin permissionPulsarAdminException.NotFoundException
- Tenant or Namespace does not existPulsarAdminException
- Unexpected error
-
getSchemaValidationEnforcedAsync
Get schema validation enforced for namespace asynchronously.- Parameters:
namespace
- namespace for this command.applied
- applied for this command.- Returns:
- the schema validation enforced flag
-
setSchemaValidationEnforced
void setSchemaValidationEnforced(String namespace, boolean schemaValidationEnforced) throws PulsarAdminException Set schema validation enforced for namespace. if a producer without a schema attempts to produce to a topic with schema in this the namespace, the producer will be failed to connect. PLEASE be carefully on using this, since non-java clients don't support schema. if you enable this setting, it will cause non-java clients failed to produce.- Parameters:
namespace
- pulsar namespace nameschemaValidationEnforced
- flag to enable or disable schema validation for the given namespace- Throws:
PulsarAdminException.NotAuthorizedException
- Don't have admin permissionPulsarAdminException.NotFoundException
- Tenant or Namespace does not existPulsarAdminException
- Unexpected error
-
setSchemaValidationEnforcedAsync
CompletableFuture<Void> setSchemaValidationEnforcedAsync(String namespace, boolean schemaValidationEnforced) Set schema validation enforced for namespace asynchronously. if a producer without a schema attempts to produce to a topic with schema in this the namespace, the producer will be failed to connect. PLEASE be carefully on using this, since non-java clients don't support schema. if you enable this setting, it will cause non-java clients failed to produce.- Parameters:
namespace
- pulsar namespace nameschemaValidationEnforced
- flag to enable or disable schema validation for the given namespace
-
getSchemaCompatibilityStrategy
SchemaCompatibilityStrategy getSchemaCompatibilityStrategy(String namespace) throws PulsarAdminException Get the strategy used to check the a new schema provided by a producer is compatible with the current schema before it is installed.- Parameters:
namespace
- The namespace in whose policy we are interested- Returns:
- the strategy used to check compatibility
- Throws:
PulsarAdminException.NotAuthorizedException
- Don't have admin permissionPulsarAdminException.NotFoundException
- Namespace does not existPulsarAdminException
- Unexpected error
-
getSchemaCompatibilityStrategyAsync
CompletableFuture<SchemaCompatibilityStrategy> getSchemaCompatibilityStrategyAsync(String namespace) Get the strategy used to check the a new schema provided by a producer is compatible with the current schema before it is installed asynchronously.- Parameters:
namespace
- The namespace in whose policy we are interested- Returns:
- the strategy used to check compatibility
-
setSchemaCompatibilityStrategy
void setSchemaCompatibilityStrategy(String namespace, SchemaCompatibilityStrategy strategy) throws PulsarAdminException Set the strategy used to check the a new schema provided by a producer is compatible with the current schema before it is installed.- Parameters:
namespace
- The namespace in whose policy should be setstrategy
- The schema compatibility strategy- Throws:
PulsarAdminException.NotAuthorizedException
- Don't have admin permissionPulsarAdminException.NotFoundException
- Namespace does not existPulsarAdminException
- Unexpected error
-
setSchemaCompatibilityStrategyAsync
CompletableFuture<Void> setSchemaCompatibilityStrategyAsync(String namespace, SchemaCompatibilityStrategy strategy) Set the strategy used to check the a new schema provided by a producer is compatible with the current schema before it is installed asynchronously.- Parameters:
namespace
- The namespace in whose policy should be setstrategy
- The schema compatibility strategy
-
getIsAllowAutoUpdateSchema
Get whether allow auto update schema.- Parameters:
namespace
- pulsar namespace name- Returns:
- the schema validation enforced flag
- Throws:
PulsarAdminException.NotAuthorizedException
- Don't have admin permissionPulsarAdminException.NotFoundException
- Tenant or Namespace does not existPulsarAdminException
- Unexpected error
-
getIsAllowAutoUpdateSchemaAsync
Get whether allow auto update schema asynchronously.- Parameters:
namespace
- pulsar namespace name- Returns:
- the schema validation enforced flag
-
setIsAllowAutoUpdateSchema
void setIsAllowAutoUpdateSchema(String namespace, boolean isAllowAutoUpdateSchema) throws PulsarAdminException Set whether to allow automatic schema updates. The flag is when producer bring a new schema and the schema pass compatibility check whether allow schema auto registered- Parameters:
namespace
- pulsar namespace nameisAllowAutoUpdateSchema
- flag to enable or disable auto update schema- Throws:
PulsarAdminException.NotAuthorizedException
- Don't have admin permissionPulsarAdminException.NotFoundException
- Tenant or Namespace does not existPulsarAdminException
- Unexpected error
-
setIsAllowAutoUpdateSchemaAsync
CompletableFuture<Void> setIsAllowAutoUpdateSchemaAsync(String namespace, boolean isAllowAutoUpdateSchema) Set whether to allow automatic schema updates asynchronously. The flag is when producer bring a new schema and the schema pass compatibility check whether allow schema auto registered- Parameters:
namespace
- pulsar namespace nameisAllowAutoUpdateSchema
- flag to enable or disable auto update schema
-
setOffloadPolicies
void setOffloadPolicies(String namespace, OffloadPolicies offloadPolicies) throws PulsarAdminException Set the offload configuration for all the topics in a namespace. Set the offload configuration in a namespace. This operation requires pulsar tenant access. Request parameter example:{ "region" : "us-east-2", // The long term storage region "bucket" : "bucket", // Bucket to place offloaded ledger into "endpoint" : "endpoint", // Alternative endpoint to connect to "maxBlockSize" : 1024, // Max Block Size, default 64MB "readBufferSize" : 1024, // Read Buffer Size, default 1MB }
- Parameters:
namespace
- Namespace nameoffloadPolicies
- Offload configuration- Throws:
PulsarAdminException.NotAuthorizedException
- Don't have admin permissionPulsarAdminException.NotFoundException
- Namespace does not existPulsarAdminException.ConflictException
- Concurrent modificationPulsarAdminException
- Unexpected error
-
removeOffloadPolicies
Remove the offload configuration for a namespace. Remove the offload configuration in a namespace. This operation requires pulsar tenant access.- Parameters:
namespace
- Namespace name- Throws:
PulsarAdminException.NotAuthorizedException
- Don't have admin permissionPulsarAdminException.NotFoundException
- Namespace does not existPulsarAdminException.ConflictException
- Concurrent modificationPulsarAdminException
- Unexpected error
-
setOffloadPoliciesAsync
Set the offload configuration for all the topics in a namespace asynchronously. Set the offload configuration in a namespace. This operation requires pulsar tenant access. Request parameter example:{ "region" : "us-east-2", // The long term storage region "bucket" : "bucket", // Bucket to place offloaded ledger into "endpoint" : "endpoint", // Alternative endpoint to connect to "maxBlockSize" : 1024, // Max Block Size, default 64MB "readBufferSize" : 1024, // Read Buffer Size, default 1MB }
- Parameters:
namespace
- Namespace nameoffloadPolicies
- Offload configuration
-
removeOffloadPoliciesAsync
Remove the offload configuration for a namespace asynchronously. Remove the offload configuration in a namespace. This operation requires pulsar tenant access.- Parameters:
namespace
- Namespace name- Throws:
PulsarAdminException.NotAuthorizedException
- Don't have admin permissionPulsarAdminException.NotFoundException
- Namespace does not existPulsarAdminException.ConflictException
- Concurrent modificationPulsarAdminException
- Unexpected error
-
getOffloadPolicies
Get the offload configuration for a namespace. Get the offload configuration for a namespace. Response example:{ "region" : "us-east-2", // The long term storage region "bucket" : "bucket", // Bucket to place offloaded ledger into "endpoint" : "endpoint", // Alternative endpoint to connect to "maxBlockSize" : 1024, // Max Block Size, default 64MB "readBufferSize" : 1024, // Read Buffer Size, default 1MB }
- Parameters:
namespace
- Namespace name- Throws:
PulsarAdminException.NotAuthorizedException
- Don't have admin permissionPulsarAdminException.NotFoundException
- Namespace does not existPulsarAdminException.ConflictException
- Concurrent modificationPulsarAdminException
- Unexpected error
-
getOffloadPoliciesAsync
Get the offload configuration for a namespace asynchronously. Get the offload configuration for a namespace. Response example:{ "region" : "us-east-2", // The long term storage region "bucket" : "bucket", // Bucket to place offloaded ledger into "endpoint" : "endpoint", // Alternative endpoint to connect to "maxBlockSize" : 1024, // Max Block Size, default 64MB "readBufferSize" : 1024, // Read Buffer Size, default 1MB }
- Parameters:
namespace
- Namespace name
-
getMaxTopicsPerNamespace
Get maxTopicsPerNamespace for a namespace. Response example:0
- Parameters:
namespace
- Namespace name- Returns:
- Throws:
PulsarAdminException.NotAuthorizedException
- Don't have admin permissionPulsarAdminException.NotFoundException
- Namespace dost not existPulsarAdminException
- Unexpected error
-
getMaxTopicsPerNamespaceAsync
Get maxTopicsPerNamespace for a namespace asynchronously. Response example:0
- Parameters:
namespace
- Namespace name- Returns:
-
setMaxTopicsPerNamespace
void setMaxTopicsPerNamespace(String namespace, int maxTopicsPerNamespace) throws PulsarAdminException Set maxTopicsPerNamespace for a namespace. Request example:100
- Parameters:
namespace
- Namespace namemaxTopicsPerNamespace
- maxTopicsPerNamespace value for a namespace- Throws:
PulsarAdminException.NotAuthorizedException
- Don't have admin permissionPulsarAdminException.NotFoundException
- Namespace does not existPulsarAdminException
- Unexpected error
-
setMaxTopicsPerNamespaceAsync
Set maxTopicsPerNamespace for a namespace asynchronously. Request example:100
- Parameters:
namespace
- Namespace namemaxTopicsPerNamespace
- maxTopicsPerNamespace value for a namespace- Returns:
-
removeMaxTopicsPerNamespace
remove maxTopicsPerNamespace for a namespace.- Parameters:
namespace
- Namespace name- Throws:
PulsarAdminException.NotAuthorizedException
- Don't have admin permissionPulsarAdminException.NotFoundException
- Namespace does not existPulsarAdminException
- Unexpected error
-
removeMaxTopicsPerNamespaceAsync
remove maxTopicsPerNamespace for a namespace asynchronously.- Parameters:
namespace
- Namespace name- Throws:
PulsarAdminException.NotAuthorizedException
- Don't have admin permissionPulsarAdminException.NotFoundException
- Namespace does not existPulsarAdminException
- Unexpected error
-
setPropertyAsync
Set key value pair property for a namespace. If the property absents, a new property will added. Otherwise, the new value will overwrite. Example:admin.namespaces().setProperty("a", "a"); admin.namespaces().setProperty("b", "b");
- Parameters:
namespace
- Namespace namekey
- key of the propertyvalue
- value of the property
-
setProperty
Set key value pair property for a namespace. If the property absents, a new property will added. Otherwise, the new value will overwrite. Example:admin.namespaces().setProperty("a", "a"); admin.namespaces().setProperty("b", "b");
- Parameters:
namespace
- Namespace namekey
- key of the propertyvalue
- value of the property- Throws:
PulsarAdminException
-
setPropertiesAsync
Set key value pair properties for a namespace asynchronously. If the property absents, a new property will added. Otherwise, the new value will overwrite.- Parameters:
namespace
- Namespace nameproperties
- key value pair properties
-
setProperties
Set key value pair properties for a namespace. If the property absents, a new property will added. Otherwise, the new value will overwrite.- Parameters:
namespace
- Namespace nameproperties
- key value pair properties- Throws:
PulsarAdminException
-
getPropertyAsync
Get property value for a given key. If the property absents, will return null. Example:admin.namespaces().getProperty("a"); admin.namespaces().getProperty("b");
- Parameters:
namespace
- Namespace namekey
- key of the property- Returns:
- value of the property.
-
getProperty
Get property value for a given key. If the property absents, will return null. Example:admin.namespaces().getProperty("a"); admin.namespaces().getProperty("b");
- Parameters:
namespace
- Namespace namekey
- key of the property- Returns:
- value of the property.
- Throws:
PulsarAdminException
-
getPropertiesAsync
Get all properties of a namespace asynchronously. Example:admin.namespaces().getPropertiesAsync();
- Parameters:
namespace
- Namespace name- Returns:
- key value pair properties.
-
getProperties
Get all properties of a namespace. Example:admin.namespaces().getProperties();
- Parameters:
namespace
- Namespace name- Returns:
- key value pair properties.
- Throws:
PulsarAdminException
-
removePropertyAsync
Remove a property for a given key. Return value of the property if the property exists, otherwise return null. Example:admin.namespaces().removeProperty("a"); admin.namespaces().removeProperty("b");
- Parameters:
namespace
- Namespace namekey
- key of the property- Returns:
- value of the property.
-
removeProperty
Remove a property for a given key. Return value of the property if the property exists, otherwise return null. Example:admin.namespaces().removeProperty("a"); admin.namespaces().removeProperty("b");
- Parameters:
namespace
- Namespace namekey
- key of the property- Returns:
- value of the property.
- Throws:
PulsarAdminException
-
clearPropertiesAsync
Clear all properties of a namespace asynchronously. Example:admin.namespaces().clearPropertiesAsync();
- Parameters:
namespace
- Namespace name
-
clearProperties
Clear all properties of a namespace. Example:admin.namespaces().clearProperties();
- Parameters:
namespace
- Namespace name- Throws:
PulsarAdminException
-
getNamespaceResourceGroup
Get the ResourceGroup for a namespace. Response example:60
- Parameters:
namespace
- Namespace name- Returns:
- Throws:
PulsarAdminException.NotAuthorizedException
- Don't have admin permissionPulsarAdminException.NotFoundException
- Namespace does not existPulsarAdminException
- Unexpected error
-
getNamespaceResourceGroupAsync
Get the ResourceGroup for a namespace asynchronously. Response example:60
- Parameters:
namespace
- Namespace name
-
setNamespaceResourceGroup
void setNamespaceResourceGroup(String namespace, String resourcegroupname) throws PulsarAdminException Set the ResourceGroup for a namespace. Request example:60
- Parameters:
namespace
- Namespace nameresourcegroupname
- ResourceGroup name- Throws:
PulsarAdminException.NotAuthorizedException
- Don't have admin permissionPulsarAdminException.NotFoundException
- Namespace does not existPulsarAdminException
- Unexpected error
-
setNamespaceResourceGroupAsync
Set the ResourceGroup for a namespace asynchronously. Request example:60
- Parameters:
namespace
- Namespace nameresourcegroupname
- TTL values for all messages for all topics in this namespace
-
removeNamespaceResourceGroup
Remove the ResourceGroup on a namespace.- Parameters:
namespace
-- Throws:
PulsarAdminException
-
removeNamespaceResourceGroupAsync
Remove the ResourceGroup on a namespace asynchronously.- Parameters:
namespace
-- Returns:
-
getNamespaceEntryFilters
Get entry filters for a namespace.- Parameters:
namespace
-- Returns:
- entry filters classes info.
- Throws:
PulsarAdminException
-
getNamespaceEntryFiltersAsync
Get entry filters for a namespace asynchronously.- Parameters:
namespace
-- Returns:
- entry filters classes info.
-
setNamespaceEntryFilters
void setNamespaceEntryFilters(String namespace, EntryFilters entryFilters) throws PulsarAdminException Set entry filters on a namespace.- Parameters:
namespace
- Namespace nameentryFilters
- The entry filters- Throws:
PulsarAdminException
-
setNamespaceEntryFiltersAsync
Set entry filters on a namespace asynchronously.- Parameters:
namespace
- Namespace nameentryFilters
- The entry filters
-
removeNamespaceEntryFilters
remove entry filters of a namespace.- Parameters:
namespace
- Namespace name- Throws:
PulsarAdminException
-
removeNamespaceEntryFiltersAsync
remove entry filters of a namespace asynchronously.- Parameters:
namespace
- Namespace name- Returns:
-