Package org.apache.pulsar.client.admin
Interface Namespaces
public interface Namespaces
Admin interface for namespaces management.
- 
Method SummaryModifier and TypeMethodDescriptionvoidclearNamespaceBacklog(String namespace) Clear backlog for all topics on a namespace.clearNamespaceBacklogAsync(String namespace) Clear backlog for all topics on a namespace asynchronously.voidclearNamespaceBacklogForSubscription(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.voidclearNamespaceBundleBacklog(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.voidclearNamespaceBundleBacklogForSubscription(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.voidclearOffloadDeleteLag(String namespace) Clear the offload deletion lag for a namespace.clearOffloadDeleteLagAsync(String namespace) Clear the offload deletion lag for a namespace asynchronously.voidclearProperties(String namespace) Clear all properties of a namespace.clearPropertiesAsync(String namespace) Clear all properties of a namespace asynchronously.voidcreateNamespace(String namespace) Create a new namespace.voidcreateNamespace(String namespace, int numBundles) Create a new namespace.voidcreateNamespace(String namespace, Set<String> clusters) Create a new namespace.voidcreateNamespace(String namespace, BundlesData bundlesData) Create a new namespace.voidcreateNamespace(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.voiddeleteBookieAffinityGroup(String namespace) Delete bookie affinity group configured for a namespace.deleteBookieAffinityGroupAsync(String namespace) Delete bookie affinity group configured for a namespace asynchronously.voiddeleteNamespace(String namespace) Delete an existing namespace.voiddeleteNamespace(String namespace, boolean force) Delete an existing namespace.voiddeleteNamespaceAntiAffinityGroup(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.voiddeleteNamespaceBundle(String namespace, String bundleRange) Delete an existing bundle in a namespace.voiddeleteNamespaceBundle(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.booleangetDispatcherPauseOnAckStatePersistent(String namespace) Get the dispatcherPauseOnAckStatePersistentEnabled policy for a given namespace.Get the dispatcherPauseOnAckStatePersistentEnabled policy for a given 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.booleangetIsAllowAutoUpdateSchema(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.intgetMaxTopicsPerNamespace(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.getNamespaceAllowedClusters(String namespace) Get the allowed clusters for a namespace.getNamespaceAllowedClustersAsync(String namespace) Get the allowed clusters 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.longgetOffloadThreshold(String namespace) Get the offloadThreshold for a namespace.getOffloadThresholdAsync(String namespace) Get the offloadThreshold for a namespace asynchronously.longgetOffloadThresholdInSeconds(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.booleangetSchemaValidationEnforced(String namespace) Get schema validation enforced for namespace.booleangetSchemaValidationEnforced(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.voidgrantPermissionOnNamespace(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.voidgrantPermissionOnSubscription(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.voidGrant permissions on topics.Grant permissions on topics asynchronously.voidremoveAutoSubscriptionCreation(String namespace) Removes the autoSubscriptionCreation policy for a given namespace.removeAutoSubscriptionCreationAsync(String namespace) Removes the autoSubscriptionCreation policy for a given namespace asynchronously.voidremoveAutoTopicCreation(String namespace) Removes the autoTopicCreation policy for a given namespace.removeAutoTopicCreationAsync(String namespace) Removes the autoTopicCreation policy for a given namespace asynchronously.default voidremoveBacklogQuota(String namespace) voidremoveBacklogQuota(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.voidremoveCompactionThreshold(String namespace) Delete the compactionThreshold for a namespace.removeCompactionThresholdAsync(String namespace) Delete the compactionThreshold for a namespace asynchronously.voidremoveDeduplicationSnapshotInterval(String namespace) Remove the deduplicationSnapshotInterval for a namespace.removeDeduplicationSnapshotIntervalAsync(String namespace) Remove the deduplicationSnapshotInterval for a namespace asynchronously.voidremoveDeduplicationStatus(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.voidremoveDelayedDeliveryMessages(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.voidremoveDispatcherPauseOnAckStatePersistent(String namespace) Removes the dispatcherPauseOnAckStatePersistentEnabled policy for a given namespace.Removes the dispatcherPauseOnAckStatePersistentEnabled policy for a given namespace asynchronously.voidremoveDispatchRate(String namespace) Remove message-dispatch-rate.removeDispatchRateAsync(String namespace) Remove message-dispatch-rate asynchronously.voidremoveInactiveTopicPolicies(String namespace) Remove inactive topic policies from a namespace.removeInactiveTopicPoliciesAsync(String namespace) remove InactiveTopicPolicies from a namespace asynchronously.voidremoveMaxConsumersPerSubscription(String namespace) Remove maxConsumersPerSubscription for a namespace.removeMaxConsumersPerSubscriptionAsync(String namespace) Remove maxConsumersPerSubscription for a namespace asynchronously.voidremoveMaxConsumersPerTopic(String namespace) Remove maxConsumersPerTopic for a namespace.removeMaxConsumersPerTopicAsync(String namespace) Remove maxConsumersPerTopic for a namespace asynchronously.voidremoveMaxProducersPerTopic(String namespace) Remove maxProducersPerTopic for a namespace.removeMaxProducersPerTopicAsync(String namespace) Set maxProducersPerTopic for a namespace asynchronously.voidremoveMaxSubscriptionsPerTopic(String namespace) Remove the maxSubscriptionsPerTopic for a namespace.removeMaxSubscriptionsPerTopicAsync(String namespace) Remove the maxSubscriptionsPerTopic for a namespace asynchronously.voidremoveMaxTopicsPerNamespace(String namespace) remove maxTopicsPerNamespace for a namespace.removeMaxTopicsPerNamespaceAsync(String namespace) remove maxTopicsPerNamespace for a namespace asynchronously.voidremoveMaxUnackedMessagesPerConsumer(String namespace) Remove maxUnackedMessagesPerConsumer for a namespace.removeMaxUnackedMessagesPerConsumerAsync(String namespace) Remove maxUnackedMessagesPerConsumer for a namespace asynchronously.voidremoveMaxUnackedMessagesPerSubscription(String namespace) Remove maxUnackedMessagesPerSubscription for a namespace.Remove maxUnackedMessagesPerSubscription for a namespace asynchronously.voidremoveNamespaceEntryFilters(String namespace) remove entry filters of a namespace.removeNamespaceEntryFiltersAsync(String namespace) remove entry filters of a namespace asynchronously.voidremoveNamespaceMessageTTL(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.voidremoveNamespaceResourceGroup(String namespace) Remove the ResourceGroup on a namespace.removeNamespaceResourceGroupAsync(String namespace) Remove the ResourceGroup on a namespace asynchronously.voidremoveOffloadPolicies(String namespace) Remove the offload configuration for a namespace.removeOffloadPoliciesAsync(String namespace) Remove the offload configuration for a namespace asynchronously.voidremovePersistence(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.voidremovePublishRate(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.voidremoveReplicatorDispatchRate(String namespace) Remove replicator-message-dispatch-rate.removeReplicatorDispatchRateAsync(String namespace) Set replicator-message-dispatch-rate asynchronously.voidremoveRetention(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.voidremoveSubscribeRate(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.voidremoveSubscriptionDispatchRate(String namespace) Remove subscription-message-dispatch-rate.removeSubscriptionDispatchRateAsync(String namespace) Remove subscription-message-dispatch-rate asynchronously.voidremoveSubscriptionExpirationTime(String namespace) Remove the subscription expiration time for a namespace.removeSubscriptionExpirationTimeAsync(String namespace) Remove the subscription expiration time for a namespace asynchronously.voidremoveSubscriptionTypesEnabled(String namespace) Removes the subscriptionTypesEnabled policy for a given namespace.removeSubscriptionTypesEnabledAsync(String namespace) Removes the subscriptionTypesEnabled policy for a given namespace.voidrevokePermissionOnSubscription(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.voidRevoke permissions on topics.Revoke permissions on topics asynchronously.voidrevokePermissionsOnNamespace(String namespace, String role) Revoke permissions on a namespace.revokePermissionsOnNamespaceAsync(String namespace, String role) Revoke permissions on a namespace asynchronously.voidsetAutoSubscriptionCreation(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.voidsetAutoTopicCreation(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 voidsetBacklogQuota(String namespace, BacklogQuota backlogQuota) voidsetBacklogQuota(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.voidsetBookieAffinityGroup(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.voidsetCompactionThreshold(String namespace, long compactionThreshold) Set the compactionThreshold for a namespace.setCompactionThresholdAsync(String namespace, long compactionThreshold) Set the compactionThreshold for a namespace asynchronously.voidsetDeduplicationSnapshotInterval(String namespace, Integer interval) Set the deduplicationSnapshotInterval for a namespace.setDeduplicationSnapshotIntervalAsync(String namespace, Integer interval) Set the deduplicationSnapshotInterval for a namespace asynchronously.voidsetDeduplicationStatus(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.voidsetDelayedDeliveryMessages(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.voidsetDispatcherPauseOnAckStatePersistent(String namespace) Remove entry filters of a namespace.Set DispatcherPauseOnAckStatePersistent for a namespace asynchronously.voidsetDispatchRate(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.voidsetEncryptionRequiredStatus(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.voidsetInactiveTopicPolicies(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.voidsetIsAllowAutoUpdateSchema(String namespace, boolean isAllowAutoUpdateSchema) Set whether to allow automatic schema updates.setIsAllowAutoUpdateSchemaAsync(String namespace, boolean isAllowAutoUpdateSchema) Set whether to allow automatic schema updates asynchronously.voidsetMaxConsumersPerSubscription(String namespace, int maxConsumersPerSubscription) Set maxConsumersPerSubscription for a namespace.setMaxConsumersPerSubscriptionAsync(String namespace, int maxConsumersPerSubscription) Set maxConsumersPerSubscription for a namespace asynchronously.voidsetMaxConsumersPerTopic(String namespace, int maxConsumersPerTopic) Set maxConsumersPerTopic for a namespace.setMaxConsumersPerTopicAsync(String namespace, int maxConsumersPerTopic) Set maxConsumersPerTopic for a namespace asynchronously.voidsetMaxProducersPerTopic(String namespace, int maxProducersPerTopic) Set maxProducersPerTopic for a namespace.setMaxProducersPerTopicAsync(String namespace, int maxProducersPerTopic) Set maxProducersPerTopic for a namespace asynchronously.voidsetMaxSubscriptionsPerTopic(String namespace, int maxSubscriptionsPerTopic) Set the maxSubscriptionsPerTopic for a namespace.setMaxSubscriptionsPerTopicAsync(String namespace, int maxSubscriptionsPerTopic) Set the maxSubscriptionsPerTopic for a namespace asynchronously.voidsetMaxTopicsPerNamespace(String namespace, int maxTopicsPerNamespace) Set maxTopicsPerNamespace for a namespace.setMaxTopicsPerNamespaceAsync(String namespace, int maxTopicsPerNamespace) Set maxTopicsPerNamespace for a namespace asynchronously.voidsetMaxUnackedMessagesPerConsumer(String namespace, int maxUnackedMessagesPerConsumer) Set maxUnackedMessagesPerConsumer for a namespace.setMaxUnackedMessagesPerConsumerAsync(String namespace, int maxUnackedMessagesPerConsumer) Set maxUnackedMessagesPerConsumer for a namespace asynchronously.voidsetMaxUnackedMessagesPerSubscription(String namespace, int maxUnackedMessagesPerSubscription) Set maxUnackedMessagesPerSubscription for a namespace.setMaxUnackedMessagesPerSubscriptionAsync(String namespace, int maxUnackedMessagesPerSubscription) Set maxUnackedMessagesPerSubscription for a namespace asynchronously.voidsetNamespaceAllowedClusters(String namespace, Set<String> clusterIds) Set the allowed clusters for a namespace.setNamespaceAllowedClustersAsync(String namespace, Set<String> clusterIds) Set the allowed clusters for a namespace asynchronously.voidsetNamespaceAntiAffinityGroup(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.voidsetNamespaceEntryFilters(String namespace, EntryFilters entryFilters) Set entry filters on a namespace.setNamespaceEntryFiltersAsync(String namespace, EntryFilters entryFilters) Set entry filters on a namespace asynchronously.voidsetNamespaceMessageTTL(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.voidsetNamespaceReplicationClusters(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.voidsetNamespaceResourceGroup(String namespace, String resourcegroupname) Set the ResourceGroup for a namespace.setNamespaceResourceGroupAsync(String namespace, String resourcegroupname) Set the ResourceGroup for a namespace asynchronously.voidsetOffloadDeleteLag(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.voidsetOffloadPolicies(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.voidsetOffloadThreshold(String namespace, long offloadThreshold) Set the offloadThreshold for a namespace.setOffloadThresholdAsync(String namespace, long offloadThreshold) Set the offloadThreshold for a namespace asynchronously.voidsetOffloadThresholdInSeconds(String namespace, long offloadThresholdInSeconds) Set the offloadThresholdInSeconds for a namespace.setOffloadThresholdInSecondsAsync(String namespace, long offloadThresholdInSeconds) Set the offloadThresholdInSeconds for a namespace.voidsetPersistence(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.voidsetProperties(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.voidsetProperty(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.voidsetPublishRate(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.voidsetReplicatorDispatchRate(String namespace, DispatchRate dispatchRate) Set replicator-message-dispatch-rate.setReplicatorDispatchRateAsync(String namespace, DispatchRate dispatchRate) Set replicator-message-dispatch-rate asynchronously.voidsetRetention(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.voidsetSchemaAutoUpdateCompatibilityStrategy(String namespace, SchemaAutoUpdateCompatibilityStrategy strategy) Deprecated.voidsetSchemaCompatibilityStrategy(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.voidsetSchemaValidationEnforced(String namespace, boolean schemaValidationEnforced) Set schema validation enforced for namespace.setSchemaValidationEnforcedAsync(String namespace, boolean schemaValidationEnforced) Set schema validation enforced for namespace asynchronously.voidsetSubscribeRate(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.voidsetSubscriptionAuthMode(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.voidsetSubscriptionDispatchRate(String namespace, DispatchRate dispatchRate) Set subscription-message-dispatch-rate.setSubscriptionDispatchRateAsync(String namespace, DispatchRate dispatchRate) Set subscription-message-dispatch-rate asynchronously.voidsetSubscriptionExpirationTime(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.voidsetSubscriptionTypesEnabled(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.voidsplitNamespaceBundle(String namespace, String bundle, boolean unloadSplitBundles, String splitAlgorithmName) Split namespace bundle.voidsplitNamespaceBundle(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.voidUnload a namespace from the current serving broker.unloadAsync(String namespace) Unload a namespace from the current serving broker asynchronously.voidunloadNamespaceBundle(String namespace, String bundle) Unload namespace bundle.voidunloadNamespaceBundle(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.voidunsubscribeNamespace(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.voidunsubscribeNamespaceBundle(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.voidupdateMigrationState(String namespace, boolean migrated) Enable migration for all topics within a namespace.
- 
Method Details- 
getNamespacesGet 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 permission
- PulsarAdminException.NotFoundException- Tenant does not exist
- PulsarAdminException- Unexpected error
 
- 
getNamespacesAsyncGet 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
 
- 
getNamespacesDeprecated.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 name
- cluster- Cluster name
- Throws:
- PulsarAdminException.NotAuthorizedException- Don't have admin permission
- PulsarAdminException.NotFoundException- Tenant or cluster does not exist
- PulsarAdminException- Unexpected error
 
- 
getTopicsGet 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 permission
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException- Unexpected error
 
- 
getTopicsAsyncGet 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
 
- 
getTopicsList<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 name
- options- List namespace topics options
- Throws:
- PulsarAdminException.NotAuthorizedException- You don't have admin permission
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException- Unexpected error
 
- 
getTopicsAsyncCompletableFuture<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 name
- options- List namespace topics options
 
- 
getBundlesGet 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 permission
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException- Unexpected error
 
- 
getBundlesAsyncGet the list of bundles asynchronously. Get the list of all the bundles under a certain namespace.- Parameters:
- namespace- Namespace name
 
- 
getPoliciesGet 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 permission
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException- Unexpected error
- See Also:
 
- 
getPoliciesAsyncGet 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:
 
- 
createNamespaceCreate a new namespace. Creates a new empty namespace with no policies attached.- Parameters:
- namespace- Namespace name
- numBundles- Number of bundles
- Throws:
- PulsarAdminException.NotAuthorizedException- You don't have admin permission
- PulsarAdminException.NotFoundException- Tenant or cluster does not exist
- PulsarAdminException.ConflictException- Namespace already exists
- PulsarAdminException- Unexpected error
 
- 
createNamespaceAsyncCreate a new namespace. Creates a new empty namespace with no policies attached.- Parameters:
- namespace- Namespace name
- numBundles- Number of bundles
 
- 
createNamespaceCreate a new namespace. Creates a new empty namespace with no policies attached.- Parameters:
- namespace- Namespace name
- bundlesData- Bundles Data
- Throws:
- PulsarAdminException.NotAuthorizedException- You don't have admin permission
- PulsarAdminException.NotFoundException- Tenant or cluster does not exist
- PulsarAdminException.ConflictException- Namespace already exists
- PulsarAdminException- Unexpected error
 
- 
createNamespaceAsyncCreate a new namespace asynchronously. Creates a new empty namespace with no policies attached.- Parameters:
- namespace- Namespace name
- bundlesData- Bundles Data
 
- 
createNamespaceCreate a new namespace. Creates a new empty namespace with no policies attached.- Parameters:
- namespace- Namespace name
- Throws:
- PulsarAdminException.NotAuthorizedException- You don't have admin permission
- PulsarAdminException.NotFoundException- Tenant or cluster does not exist
- PulsarAdminException.ConflictException- Namespace already exists
- PulsarAdminException- Unexpected error
 
- 
createNamespaceAsyncCreate a new namespace asynchronously. Creates a new empty namespace with no policies attached.- Parameters:
- namespace- Namespace name
 
- 
createNamespaceCreate a new namespace. Creates a new empty namespace with no policies attached.- Parameters:
- namespace- Namespace name
- clusters- 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 permission
- PulsarAdminException.NotFoundException- Tenant or cluster does not exist
- PulsarAdminException.ConflictException- Namespace already exists
- PulsarAdminException- Unexpected error
 
- 
createNamespaceAsyncCreate a new namespace asynchronously. Creates a new empty namespace with no policies attached.- Parameters:
- namespace- Namespace name
- clusters- Clusters in which the namespace will be present. If more than one cluster is present, replication across clusters will be enabled.
 
- 
createNamespaceCreate a new namespace. Creates a new namespace with the specified policies.- Parameters:
- namespace- Namespace name
- policies- Policies for the namespace
- Throws:
- PulsarAdminException.NotAuthorizedException- You don't have admin permission
- PulsarAdminException.NotFoundException- Tenant or cluster does not exist
- PulsarAdminException.ConflictException- Namespace already exists
- PulsarAdminException- Unexpected error
- Since:
- 2.0
 
- 
createNamespaceAsyncCreate a new namespace asynchronously. Creates a new namespace with the specified policies.- Parameters:
- namespace- Namespace name
- policies- Policies for the namespace
 
- 
deleteNamespaceDelete an existing namespace. The namespace needs to be empty.- Parameters:
- namespace- Namespace name
- Throws:
- PulsarAdminException.NotAuthorizedException- You don't have admin permission
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException.ConflictException- Namespace is not empty
- PulsarAdminException- Unexpected error
 
- 
deleteNamespaceDelete an existing namespace. Force flag deletes namespace forcefully by force deleting all topics under it.- Parameters:
- namespace- Namespace name
- force- Delete namespace forcefully
- Throws:
- PulsarAdminException.NotAuthorizedException- You don't have admin permission
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException.ConflictException- Namespace is not empty
- PulsarAdminException- Unexpected error
 
- 
deleteNamespaceAsyncDelete an existing namespace asynchronously. The namespace needs to be empty.- Parameters:
- namespace- Namespace name
 
- 
deleteNamespaceAsyncDelete an existing namespace asynchronously. Force flag deletes namespace forcefully by force deleting all topics under it.- Parameters:
- namespace- Namespace name
- force- Delete namespace forcefully
 
- 
deleteNamespaceBundleDelete an existing bundle in a namespace. The bundle needs to be empty.- Parameters:
- namespace- Namespace name
- bundleRange- range of the bundle
- Throws:
- PulsarAdminException.NotAuthorizedException- You don't have admin permission
- PulsarAdminException.NotFoundException- Namespace/bundle does not exist
- PulsarAdminException.ConflictException- Bundle is not empty
- PulsarAdminException- Unexpected error
 
- 
deleteNamespaceBundlevoid deleteNamespaceBundle(String namespace, String bundleRange, boolean force) throws PulsarAdminException Delete an existing bundle in a namespace. Force flag deletes bundle forcefully.- Parameters:
- namespace- Namespace name
- bundleRange- range of the bundle
- force- Delete bundle forcefully
- Throws:
- PulsarAdminException.NotAuthorizedException- You don't have admin permission
- PulsarAdminException.NotFoundException- Namespace/bundle does not exist
- PulsarAdminException.ConflictException- Bundle is not empty
- PulsarAdminException- Unexpected error
 
- 
deleteNamespaceBundleAsyncDelete an existing bundle in a namespace asynchronously. The bundle needs to be empty.- Parameters:
- namespace- Namespace name
- bundleRange- range of the bundle
- Returns:
- a future that can be used to track when the bundle is deleted
 
- 
deleteNamespaceBundleAsyncCompletableFuture<Void> deleteNamespaceBundleAsync(String namespace, String bundleRange, boolean force) Delete an existing bundle in a namespace asynchronously. Force flag deletes bundle forcefully.- Parameters:
- namespace- Namespace name
- bundleRange- range of the bundle
- force- Delete bundle forcefully
- Returns:
- a future that can be used to track when the bundle is deleted
 
- 
getPermissionsGet 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 permission
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException- Unexpected error
 
- 
getPermissionsAsyncGet permissions on a namespace asynchronously. Retrieve the permissions for a namespace. Response example:{ "my-role" : [ "produce" ] "other-role" : [ "consume" ] }- Parameters:
- namespace- Namespace name
 
- 
grantPermissionOnNamespacevoid 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 name
- role- Client role to which grant permission
- actions- Auth actions (produce and consume)
- Throws:
- PulsarAdminException.NotAuthorizedException- Don't have admin permission
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException.ConflictException- Concurrent modification
- PulsarAdminException- Unexpected error
 
- 
grantPermissionOnNamespaceAsyncCompletableFuture<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 name
- role- Client role to which grant permission
- actions- Auth actions (produce and consume)
 
- 
grantPermissionOnTopicsAsyncGrant permissions on topics asynchronously.- Parameters:
- options-
- Returns:
 
- 
grantPermissionOnTopicsGrant permissions on topics.- Parameters:
- options-
- Throws:
- PulsarAdminException
 
- 
revokePermissionOnTopicsAsyncRevoke permissions on topics asynchronously.- Parameters:
- options-
- Returns:
 
- 
revokePermissionOnTopicsvoid revokePermissionOnTopics(List<RevokeTopicPermissionOptions> options) throws PulsarAdminException Revoke permissions on topics.- Parameters:
- options-
- Throws:
- PulsarAdminException
 
- 
revokePermissionsOnNamespaceRevoke permissions on a namespace. Revoke all permissions to a client role on a namespace.- Parameters:
- namespace- Namespace name
- role- Client role to which remove permissions
- Throws:
- PulsarAdminException.NotAuthorizedException- Don't have admin permission
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException- Unexpected error
 
- 
revokePermissionsOnNamespaceAsyncRevoke permissions on a namespace asynchronously. Revoke all permissions to a client role on a namespace.- Parameters:
- namespace- Namespace name
- role- Client role to which remove permissions
 
- 
getPermissionOnSubscriptionGet permission to role to access subscription's admin-api.- Parameters:
- namespace-
- Throws:
- PulsarAdminException
 
- 
getPermissionOnSubscriptionAsyncGet permission to role to access subscription's admin-api asynchronously.- Parameters:
- namespace-
 
- 
grantPermissionOnSubscriptionvoid 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
 
- 
grantPermissionOnSubscriptionAsyncCompletableFuture<Void> grantPermissionOnSubscriptionAsync(String namespace, String subscription, Set<String> roles) Grant permission to role to access subscription's admin-api asynchronously.- Parameters:
- namespace-
- subscription-
- roles-
 
- 
revokePermissionOnSubscriptionvoid revokePermissionOnSubscription(String namespace, String subscription, String role) throws PulsarAdminException Revoke permissions on a subscription's admin-api access.- Parameters:
- namespace-
- subscription-
- role-
- Throws:
- PulsarAdminException
 
- 
revokePermissionOnSubscriptionAsyncCompletableFuture<Void> revokePermissionOnSubscriptionAsync(String namespace, String subscription, String role) Revoke permissions on a subscription's admin-api access asynchronously.- Parameters:
- namespace-
- subscription-
- role-
 
- 
getNamespaceReplicationClustersGet the replication clusters for a namespace. Response example:["use", "usw", "usc"]- Parameters:
- namespace- Namespace name
- Throws:
- PulsarAdminException.NotAuthorizedException- Don't have admin permission
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException.PreconditionFailedException- Namespace is not global
- PulsarAdminException- Unexpected error
 
- 
getNamespaceReplicationClustersAsyncGet the replication clusters for a namespace asynchronously. Response example:["use", "usw", "usc"]- Parameters:
- namespace- Namespace name
 
- 
setNamespaceReplicationClustersvoid 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 name
- clusterIds- Pulsar Cluster Ids
- Throws:
- PulsarAdminException.NotAuthorizedException- Don't have admin permission
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException.PreconditionFailedException- Namespace is not global
- PulsarAdminException.PreconditionFailedException- Invalid cluster ids
- PulsarAdminException- Unexpected error
 
- 
setNamespaceReplicationClustersAsyncCompletableFuture<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 name
- clusterIds- Pulsar Cluster Ids
 
- 
getNamespaceMessageTTLGet the message TTL for a namespace. Response example:60- Parameters:
- namespace- Namespace name
- Throws:
- PulsarAdminException.NotAuthorizedException- Don't have admin permission
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException- Unexpected error
 
- 
getNamespaceMessageTTLAsyncGet the message TTL for a namespace asynchronously. Response example:60- Parameters:
- namespace- Namespace name
 
- 
setNamespaceMessageTTLSet the messages Time to Live for all the topics within a namespace. Request example:60- Parameters:
- namespace- Namespace name
- ttlInSeconds- TTL values for all messages for all topics in this namespace
- Throws:
- PulsarAdminException.NotAuthorizedException- Don't have admin permission
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException- Unexpected error
 
- 
setNamespaceMessageTTLAsyncSet the messages Time to Live for all the topics within a namespace asynchronously. Request example:60- Parameters:
- namespace- Namespace name
- ttlInSeconds- TTL values for all messages for all topics in this namespace
 
- 
removeNamespaceMessageTTLRemove the messages Time to Live for all the topics within a namespace.- Parameters:
- namespace-
- Throws:
- PulsarAdminException
 
- 
removeNamespaceMessageTTLAsyncRemove the messages Time to Live for all the topics within a namespace asynchronously.- Parameters:
- namespace-
- Returns:
 
- 
getSubscriptionExpirationTimeGet the subscription expiration time for a namespace. Response example:1440- Parameters:
- namespace- Namespace name
- Throws:
- PulsarAdminException.NotAuthorizedException- Don't have admin permission
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException- Unexpected error
 
- 
getSubscriptionExpirationTimeAsyncGet the subscription expiration time for a namespace asynchronously. Response example:1440- Parameters:
- namespace- Namespace name
 
- 
setSubscriptionExpirationTimevoid 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 name
- expirationTime- Expiration time values for all subscriptions for all topics in this namespace
- Throws:
- PulsarAdminException.NotAuthorizedException- Don't have admin permission
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException- Unexpected error
 
- 
setSubscriptionExpirationTimeAsyncSet the subscription expiration time in minutes for all the topics within a namespace asynchronously. Request example:1440- Parameters:
- namespace- Namespace name
- expirationTime- Expiration time values for all subscriptions for all topics in this namespace
 
- 
removeSubscriptionExpirationTimeRemove the subscription expiration time for a namespace.- Parameters:
- namespace- Namespace name
- Throws:
- PulsarAdminException.NotAuthorizedException- Don't have admin permission
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException- Unexpected error
 
- 
removeSubscriptionExpirationTimeAsyncRemove the subscription expiration time for a namespace asynchronously.- Parameters:
- namespace- Namespace name
 
- 
setNamespaceAntiAffinityGroupvoid setNamespaceAntiAffinityGroup(String namespace, String namespaceAntiAffinityGroup) throws PulsarAdminException Set anti-affinity group name for a namespace. Request example:- Parameters:
- namespace- Namespace name
- namespaceAntiAffinityGroup- anti-affinity group name for a namespace
- Throws:
- PulsarAdminException.NotAuthorizedException- Don't have admin permission
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException- Unexpected error
 
- 
setNamespaceAntiAffinityGroupAsyncCompletableFuture<Void> setNamespaceAntiAffinityGroupAsync(String namespace, String namespaceAntiAffinityGroup) Set anti-affinity group name for a namespace asynchronously. Request example:- Parameters:
- namespace- Namespace name
- namespaceAntiAffinityGroup- anti-affinity group name for a namespace
 
- 
getAntiAffinityNamespacesList<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 name
- namespaceAntiAffinityGroup- Anti-affinity group name
- Returns:
- list of namespace grouped under a given anti-affinity group
- Throws:
- PulsarAdminException
 
- 
getAntiAffinityNamespacesAsyncCompletableFuture<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 name
- namespaceAntiAffinityGroup- Anti-affinity group name
- Returns:
- list of namespace grouped under a given anti-affinity group
 
- 
getNamespaceAntiAffinityGroupGet anti-affinity group name for a namespace. Response example:60- Parameters:
- namespace- Namespace name
- Throws:
- PulsarAdminException.NotAuthorizedException- Don't have admin permission
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException- Unexpected error
 
- 
getNamespaceAntiAffinityGroupAsyncGet anti-affinity group name for a namespace asynchronously. Response example:60- Parameters:
- namespace- Namespace name
 
- 
deleteNamespaceAntiAffinityGroupDelete anti-affinity group name for a namespace.- Parameters:
- namespace- Namespace name
- Throws:
- PulsarAdminException.NotAuthorizedException- You don't have admin permission
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException- Unexpected error
 
- 
deleteNamespaceAntiAffinityGroupAsyncDelete anti-affinity group name for a namespace.- Parameters:
- namespace- Namespace name
 
- 
removeDeduplicationStatusRemove the deduplication status for all topics within a namespace.- Parameters:
- namespace-
- Throws:
- PulsarAdminException
 
- 
removeDeduplicationStatusAsyncGet the deduplication status for all topics within a namespace asynchronously.- Parameters:
- namespace-
- Returns:
 
- 
getDeduplicationStatusGet the deduplication status for all topics within a namespace .- Parameters:
- namespace-
- Returns:
- Throws:
- PulsarAdminException
 
- 
getDeduplicationStatusAsyncGet the deduplication status for all topics within a namespace asynchronously.- Parameters:
- namespace-
- Returns:
 
- 
setDeduplicationStatusvoid 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 name
- enableDeduplication- wether to enable or disable deduplication feature
- Throws:
- PulsarAdminException.NotAuthorizedException- Don't have admin permission
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException- Unexpected error
 
- 
setDeduplicationStatusAsyncSet 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 name
- enableDeduplication- whether to enable or disable deduplication feature
 
- 
setAutoTopicCreationvoid 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 name
- autoTopicCreationOverride- Override policies for auto topic creation
- Throws:
- PulsarAdminException.NotAuthorizedException- Don't have admin permission
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException- Unexpected error
 
- 
setAutoTopicCreationAsyncCompletableFuture<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 name
- autoTopicCreationOverride- Override policies for auto topic creation
 
- 
getAutoTopicCreationGet the autoTopicCreation info within a namespace.- Parameters:
- namespace-
- Returns:
- Throws:
- PulsarAdminException
 
- 
getAutoTopicCreationAsyncGet the autoTopicCreation info within a namespace asynchronously.- Parameters:
- namespace-
- Returns:
 
- 
removeAutoTopicCreationRemoves 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 permission
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException- Unexpected error
 
- 
removeAutoTopicCreationAsyncRemoves the autoTopicCreation policy for a given namespace asynchronously. Allowing the broker to dictate the auto-creation policy.- Parameters:
- namespace- Namespace name
 
- 
setAutoSubscriptionCreationvoid 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 name
- autoSubscriptionCreationOverride- Override policies for auto subscription creation
- Throws:
- PulsarAdminException.NotAuthorizedException- Don't have admin permission
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException- Unexpected error
 
- 
setAutoSubscriptionCreationAsyncCompletableFuture<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 name
- autoSubscriptionCreationOverride- Override policies for auto subscription creation
 
- 
getAutoSubscriptionCreationAutoSubscriptionCreationOverride getAutoSubscriptionCreation(String namespace) throws PulsarAdminException Get the autoSubscriptionCreation info within a namespace.- Parameters:
- namespace-
- Returns:
- Throws:
- PulsarAdminException
 
- 
getAutoSubscriptionCreationAsyncCompletableFuture<AutoSubscriptionCreationOverride> getAutoSubscriptionCreationAsync(String namespace) Get the autoSubscriptionCreation info within a namespace asynchronously.- Parameters:
- namespace-
- Returns:
 
- 
setSubscriptionTypesEnabledvoid 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 name
- subscriptionTypesEnabled- is enable subscription types
- Throws:
- PulsarAdminException.NotAuthorizedException- Don't have admin permission
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException- Unexpected error
 
- 
setSubscriptionTypesEnabledAsyncCompletableFuture<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 name
- subscriptionTypesEnabled- is enable subscription types
 
- 
getSubscriptionTypesEnabledSet<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 permission
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException- Unexpected error
 
- 
getSubscriptionTypesEnabledAsyncCompletableFuture<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
 
- 
removeSubscriptionTypesEnabledRemoves the subscriptionTypesEnabled policy for a given namespace.- Parameters:
- namespace- Namespace name
- Throws:
- PulsarAdminException.NotAuthorizedException- Don't have admin permission
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException- Unexpected error
 
- 
removeSubscriptionTypesEnabledAsyncRemoves the subscriptionTypesEnabled policy for a given namespace.- Parameters:
- namespace- Namespace name
- Returns:
 
- 
removeAutoSubscriptionCreationRemoves 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 permission
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException- Unexpected error
 
- 
removeAutoSubscriptionCreationAsyncRemoves the autoSubscriptionCreation policy for a given namespace asynchronously. Allowing the broker to dictate the subscription auto-creation policy.- Parameters:
- namespace- Namespace name
 
- 
getBacklogQuotaMapMap<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 denied
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException- Unexpected error
 
- 
getBacklogQuotaMapAsyncCompletableFuture<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
 
- 
setBacklogQuotavoid 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 name
- backlogQuota- the new BacklogQuota
- Throws:
- PulsarAdminException.NotAuthorizedException- Don't have admin permission
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException- Unexpected error
 
- 
setBacklogQuotadefault void setBacklogQuota(String namespace, BacklogQuota backlogQuota) throws PulsarAdminException - Throws:
- PulsarAdminException
 
- 
setBacklogQuotaAsyncCompletableFuture<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 name
- backlogQuota- the new BacklogQuota
 
- 
setBacklogQuotaAsync
- 
removeBacklogQuotavoid 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 permission
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException- Unexpected error
 
- 
removeBacklogQuota- Throws:
- PulsarAdminException
 
- 
removeBacklogQuotaAsyncCompletableFuture<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
- 
removePersistenceRemove the persistence configuration on a namespace.- Parameters:
- namespace-
- Throws:
- PulsarAdminException
 
- 
removePersistenceAsyncRemove the persistence configuration on a namespace asynchronously.- Parameters:
- namespace-
 
- 
setPersistenceSet 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 name
- persistence- Persistence policies object
- Throws:
- PulsarAdminException.NotAuthorizedException- Don't have admin permission
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException.ConflictException- Concurrent modification
- PulsarAdminException- Unexpected error
 
- 
setPersistenceAsyncSet 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 name
- persistence- Persistence policies object
 
- 
getPersistenceGet 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 permission
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException.ConflictException- Concurrent modification
- PulsarAdminException- Unexpected error
 
- 
getPersistenceAsyncGet 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
 
- 
setBookieAffinityGroupvoid 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 name
- bookieAffinityGroup- bookie affinity group
- Throws:
- PulsarAdminException
 
- 
setBookieAffinityGroupAsyncCompletableFuture<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 name
- bookieAffinityGroup- bookie affinity group
 
- 
deleteBookieAffinityGroupDelete bookie affinity group configured for a namespace.- Parameters:
- namespace-
- Throws:
- PulsarAdminException
 
- 
deleteBookieAffinityGroupAsyncDelete bookie affinity group configured for a namespace asynchronously.- Parameters:
- namespace-
 
- 
getBookieAffinityGroupGet bookie affinity group configured for a namespace.- Parameters:
- namespace-
- Returns:
- Throws:
- PulsarAdminException
 
- 
getBookieAffinityGroupAsyncGet bookie affinity group configured for a namespace asynchronously.- Parameters:
- namespace-
- Returns:
 
- 
setRetentionSet 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 permission
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException.ConflictException- Concurrent modification
- PulsarAdminException- Unexpected error
 
- 
setRetentionAsyncSet 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
 
- 
removeRetentionRemove the retention configuration for all the topics on a namespace.- Parameters:
- namespace-
- Throws:
- PulsarAdminException
 
- 
removeRetentionAsyncRemove the retention configuration for all the topics on a namespace asynchronously.- Parameters:
- namespace-
- Returns:
 
- 
getRetentionGet 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 permission
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException.ConflictException- Concurrent modification
- PulsarAdminException- Unexpected error
 
- 
getRetentionAsyncGet 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
 
- 
unloadUnload a namespace from the current serving broker.- Parameters:
- namespace- Namespace name
- Throws:
- PulsarAdminException.NotAuthorizedException- Don't have admin permission
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException.PreconditionFailedException- Namespace is already unloaded
- PulsarAdminException- Unexpected error
 
- 
unloadAsyncUnload a namespace from the current serving broker asynchronously.- Parameters:
- namespace- Namespace name
 
- 
getReplicationConfigVersionGet the replication configuration version for a given namespace.- Parameters:
- namespace-
- Returns:
- Replication configuration version
- Throws:
- PulsarAdminException- Unexpected error
 
- 
getReplicationConfigVersionAsyncGet the replication configuration version for a given namespace asynchronously.- Parameters:
- namespace-
- Returns:
- Replication configuration version
 
- 
unloadNamespaceBundleUnload namespace bundle.- Parameters:
- namespace-
- bundle- range of bundle to unload
- Throws:
- PulsarAdminException- Unexpected error
 
- 
unloadNamespaceBundlevoid 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 unload
- destinationBroker- Target broker url to which the bundle should be assigned to
- Throws:
- PulsarAdminException- Unexpected error
 
- 
unloadNamespaceBundleAsyncUnload 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
 
- 
unloadNamespaceBundleAsyncCompletableFuture<Void> unloadNamespaceBundleAsync(String namespace, String bundle, String destinationBroker) Unload namespace bundle asynchronously.- Parameters:
- namespace-
- bundle- range of bundle to unload
- destinationBroker- 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
 
- 
splitNamespaceBundlevoid splitNamespaceBundle(String namespace, String bundle, boolean unloadSplitBundles, String splitAlgorithmName) throws PulsarAdminException Split namespace bundle.- Parameters:
- namespace-
- bundle- range of bundle to split
- unloadSplitBundles-
- splitAlgorithmName-
- Throws:
- PulsarAdminException
 
- 
splitNamespaceBundleAsyncCompletableFuture<Void> splitNamespaceBundleAsync(String namespace, String bundle, boolean unloadSplitBundles, String splitAlgorithmName) Split namespace bundle asynchronously.- Parameters:
- namespace-
- bundle- range of bundle to split
- unloadSplitBundles-
- splitAlgorithmName-
 
- 
splitNamespaceBundlevoid splitNamespaceBundle(String namespace, String bundle, boolean unloadSplitBundles, String splitAlgorithmName, List<Long> splitBoundaries) throws PulsarAdminException Split namespace bundle.- Parameters:
- namespace-
- bundle- range of bundle to split
- unloadSplitBundles-
- splitAlgorithmName-
- splitBoundaries-
- Throws:
- PulsarAdminException
 
- 
splitNamespaceBundleAsyncCompletableFuture<Void> splitNamespaceBundleAsync(String namespace, String bundle, boolean unloadSplitBundles, String splitAlgorithmName, List<Long> splitBoundaries) Split namespace bundle asynchronously.- Parameters:
- namespace-
- bundle- range of bundle to split
- unloadSplitBundles-
- splitAlgorithmName-
- splitBoundaries-
 
- 
getTopicHashPositionsTopicHashPositions getTopicHashPositions(String namespace, String bundle, List<String> topics) throws PulsarAdminException Get positions for topic list in a bundle.- Parameters:
- namespace-
- bundle- range of bundle
- topics-
- Returns:
- hash positions for all topics in topicList
- Throws:
- PulsarAdminException
 
- 
getTopicHashPositionsAsyncCompletableFuture<TopicHashPositions> getTopicHashPositionsAsync(String namespace, String bundle, List<String> topics) Get positions for topic list in a bundle.- Parameters:
- namespace-
- bundle- range of bundle
- topics-
- Returns:
- hash positions for all topics in topicList
- Throws:
- PulsarAdminException
 
- 
setPublishRateSet 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
 
- 
removePublishRateRemove message-publish-rate (topics under this namespace can publish this many messages per second).- Parameters:
- namespace-
- Throws:
- PulsarAdminException- Unexpected error
 
- 
setPublishRateAsyncSet message-publish-rate (topics under this namespace can publish this many messages per second) asynchronously.- Parameters:
- namespace-
- publishMsgRate- number of messages per second
 
- 
removePublishRateAsyncRemove message-publish-rate asynchronously. topics under this namespace can publish this many messages per second- Parameters:
- namespace-
 
- 
getPublishRateGet 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
 
- 
getPublishRateAsyncGet message-publish-rate (topics under this namespace can publish this many messages per second) asynchronously.- Parameters:
- namespace-
- Returns:
- number of messages per second
 
- 
removeDispatchRateRemove message-dispatch-rate.- Parameters:
- namespace-
- Throws:
- PulsarAdminException
 
- 
removeDispatchRateAsyncRemove message-dispatch-rate asynchronously.- Parameters:
- namespace-
- Returns:
 
- 
setDispatchRateSet 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
 
- 
setDispatchRateAsyncSet message-dispatch-rate asynchronously. topics under this namespace can dispatch this many messages per second- Parameters:
- namespace-
- dispatchRate- number of messages per second
 
- 
getDispatchRateGet message-dispatch-rate (topics under this namespace can dispatch this many messages per second).- Parameters:
- namespace-
- Throws:
- PulsarAdminException- Unexpected error
 
- 
getDispatchRateAsyncGet message-dispatch-rate asynchronously. Topics under this namespace can dispatch this many messages per second.- Parameters:
- namespace-
 
- 
setSubscribeRateSet namespace-subscribe-rate (topics under this namespace will limit by subscribeRate).- Parameters:
- namespace-
- subscribeRate- consumer subscribe limit by this subscribeRate
- Throws:
- PulsarAdminException- Unexpected error
 
- 
setSubscribeRateAsyncSet namespace-subscribe-rate (topics under this namespace will limit by subscribeRate) asynchronously.- Parameters:
- namespace-
- subscribeRate- consumer subscribe limit by this subscribeRate
 
- 
removeSubscribeRateRemove namespace-subscribe-rate (topics under this namespace will limit by subscribeRate).- Parameters:
- namespace-
- Throws:
- PulsarAdminException
 
- 
removeSubscribeRateAsyncRemove namespace-subscribe-rate (topics under this namespace will limit by subscribeRate) asynchronously.- Parameters:
- namespace-
 
- 
getSubscribeRateGet namespace-subscribe-rate (topics under this namespace allow subscribe times per consumer in a period).- Parameters:
- namespace-
- Throws:
- PulsarAdminException- Unexpected error
 
- 
getSubscribeRateAsyncGet namespace-subscribe-rate asynchronously. Topics under this namespace allow subscribe times per consumer in a period.- Parameters:
- namespace-
 
- 
removeSubscriptionDispatchRateRemove subscription-message-dispatch-rate.- Parameters:
- namespace-
- Throws:
- PulsarAdminException
 
- 
removeSubscriptionDispatchRateAsyncRemove subscription-message-dispatch-rate asynchronously.- Parameters:
- namespace-
- Returns:
 
- 
setSubscriptionDispatchRatevoid 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
 
- 
setSubscriptionDispatchRateAsyncCompletableFuture<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
 
- 
getSubscriptionDispatchRateGet subscription-message-dispatch-rate. Subscriptions under this namespace can dispatch this many messages per second.- Parameters:
- namespace-
- Throws:
- PulsarAdminException- Unexpected error
 
- 
getSubscriptionDispatchRateAsyncGet subscription-message-dispatch-rate asynchronously. Subscriptions under this namespace can dispatch this many messages per second.- Parameters:
- namespace-
 
- 
setReplicatorDispatchRatevoid 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
 
- 
setReplicatorDispatchRateAsyncSet replicator-message-dispatch-rate asynchronously. Replicators under this namespace can dispatch this many messages per second.- Parameters:
- namespace-
- dispatchRate- number of messages per second
 
- 
removeReplicatorDispatchRateRemove replicator-message-dispatch-rate.- Parameters:
- namespace-
- Throws:
- PulsarAdminException- Unexpected error
 
- 
removeReplicatorDispatchRateAsyncSet replicator-message-dispatch-rate asynchronously.- Parameters:
- namespace-
 
- 
getReplicatorDispatchRateGet replicator-message-dispatch-rate. Replicators under this namespace can dispatch this many messages per second.- Parameters:
- namespace-
- Throws:
- PulsarAdminException- Unexpected error
 
- 
getReplicatorDispatchRateAsyncGet replicator-message-dispatch-rate asynchronously. Replicators under this namespace can dispatch this many messages per second.- Parameters:
- namespace-
 
- 
clearNamespaceBacklogClear backlog for all topics on a namespace.- Parameters:
- namespace-
- Throws:
- PulsarAdminException- Unexpected error
 
- 
clearNamespaceBacklogAsyncClear backlog for all topics on a namespace asynchronously.- Parameters:
- namespace-
 
- 
clearNamespaceBacklogForSubscriptionvoid 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
 
- 
clearNamespaceBacklogForSubscriptionAsyncCompletableFuture<Void> clearNamespaceBacklogForSubscriptionAsync(String namespace, String subscription) Clear backlog for a given subscription on all topics on a namespace asynchronously.- Parameters:
- namespace-
- subscription-
 
- 
clearNamespaceBundleBacklogClear backlog for all topics on a namespace bundle.- Parameters:
- namespace-
- bundle-
- Throws:
- PulsarAdminException- Unexpected error
 
- 
clearNamespaceBundleBacklogAsyncClear 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
 
- 
clearNamespaceBundleBacklogForSubscriptionvoid 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
 
- 
clearNamespaceBundleBacklogForSubscriptionAsyncCompletableFuture<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
 
- 
unsubscribeNamespaceUnsubscribe the given subscription on all topics on a namespace.- Parameters:
- namespace-
- subscription-
- Throws:
- PulsarAdminException
 
- 
unsubscribeNamespaceAsyncUnsubscribe the given subscription on all topics on a namespace asynchronously.- Parameters:
- namespace-
- subscription-
 
- 
unsubscribeNamespaceBundlevoid 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
 
- 
unsubscribeNamespaceBundleAsyncCompletableFuture<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
 
- 
setEncryptionRequiredStatusvoid 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 name
- encryptionRequired- whether message encryption is required or not
- Throws:
- PulsarAdminException.NotAuthorizedException- Don't have admin permission
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException- Unexpected error
 
- 
getEncryptionRequiredStatusGet the encryption required status within a namespace.- Parameters:
- namespace-
- Returns:
- Throws:
- PulsarAdminException
 
- 
getEncryptionRequiredStatusAsyncGet the encryption required status within a namespace asynchronously.- Parameters:
- namespace-
- Returns:
 
- 
setEncryptionRequiredStatusAsyncCompletableFuture<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 name
- encryptionRequired- whether message encryption is required or not
 
- 
getDelayedDeliveryGet 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 permission
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException- Unexpected error
 
- 
getDelayedDeliveryAsyncGet 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.
 
- 
setDelayedDeliveryMessagesvoid 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 name
- delayedDeliveryPolicies- Whether to enable the delayed delivery for messages.
- Throws:
- PulsarAdminException.NotAuthorizedException- Don't have admin permission
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException- Unexpected error
 
- 
setDelayedDeliveryMessagesAsyncCompletableFuture<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 name
- delayedDeliveryPolicies- Whether to enable the delayed delivery for messages.
 
- 
removeDelayedDeliveryMessagesRemove the delayed delivery messages for all topics within a namespace.- Parameters:
- namespace-
- Throws:
- PulsarAdminException
 
- 
removeDelayedDeliveryMessagesAsyncRemove the delayed delivery messages for all topics within a namespace asynchronously.- Parameters:
- namespace-
- Returns:
 
- 
getInactiveTopicPoliciesGet the inactive deletion strategy for all topics within a namespace synchronously.- Parameters:
- namespace-
- Returns:
- Throws:
- PulsarAdminException
 
- 
removeInactiveTopicPoliciesAsyncremove InactiveTopicPolicies from a namespace asynchronously.- Parameters:
- namespace-
- Returns:
 
- 
removeInactiveTopicPoliciesRemove inactive topic policies from a namespace.- Parameters:
- namespace-
- Throws:
- PulsarAdminException
 
- 
getInactiveTopicPoliciesAsyncGet the inactive deletion strategy for all topics within a namespace asynchronously.- Parameters:
- namespace-
- Returns:
 
- 
setInactiveTopicPoliciesvoid setInactiveTopicPolicies(String namespace, InactiveTopicPolicies inactiveTopicPolicies) throws PulsarAdminException As same as setInactiveTopicPoliciesAsync, but it is synchronous.- Parameters:
- namespace-
- inactiveTopicPolicies-
- Throws:
- PulsarAdminException
 
- 
setInactiveTopicPoliciesAsyncCompletableFuture<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:
 
- 
setSubscriptionAuthModevoid setSubscriptionAuthMode(String namespace, SubscriptionAuthMode subscriptionAuthMode) throws PulsarAdminException Set the given subscription auth mode on all topics on a namespace.- Parameters:
- namespace-
- subscriptionAuthMode-
- Throws:
- PulsarAdminException
 
- 
setSubscriptionAuthModeAsyncCompletableFuture<Void> setSubscriptionAuthModeAsync(String namespace, SubscriptionAuthMode subscriptionAuthMode) Set the given subscription auth mode on all topics on a namespace asynchronously.- Parameters:
- namespace-
- subscriptionAuthMode-
 
- 
getSubscriptionAuthModeGet the subscriptionAuthMode within a namespace.- Parameters:
- namespace-
- Returns:
- Throws:
- PulsarAdminException
 
- 
getSubscriptionAuthModeAsyncGet the subscriptionAuthMode within a namespace asynchronously.- Parameters:
- namespace-
- Returns:
 
- 
getDeduplicationSnapshotIntervalGet the deduplicationSnapshotInterval for a namespace.- Parameters:
- namespace-
- Returns:
- Throws:
- PulsarAdminException
 
- 
getDeduplicationSnapshotIntervalAsyncGet the deduplicationSnapshotInterval for a namespace asynchronously.- Parameters:
- namespace-
- Returns:
 
- 
setDeduplicationSnapshotIntervalvoid setDeduplicationSnapshotInterval(String namespace, Integer interval) throws PulsarAdminException Set the deduplicationSnapshotInterval for a namespace.- Parameters:
- namespace-
- interval-
- Throws:
- PulsarAdminException
 
- 
setDeduplicationSnapshotIntervalAsyncSet the deduplicationSnapshotInterval for a namespace asynchronously.- Parameters:
- namespace-
- interval-
- Returns:
 
- 
removeDeduplicationSnapshotIntervalRemove the deduplicationSnapshotInterval for a namespace.- Parameters:
- namespace-
- Throws:
- PulsarAdminException
 
- 
removeDeduplicationSnapshotIntervalAsyncRemove the deduplicationSnapshotInterval for a namespace asynchronously.- Parameters:
- namespace-
- Returns:
 
- 
getMaxSubscriptionsPerTopicGet the maxSubscriptionsPerTopic for a namespace.- Parameters:
- namespace-
- Returns:
- Throws:
- PulsarAdminException
 
- 
getMaxSubscriptionsPerTopicAsyncGet the maxSubscriptionsPerTopic for a namespace asynchronously.- Parameters:
- namespace-
- Returns:
 
- 
setMaxSubscriptionsPerTopicvoid setMaxSubscriptionsPerTopic(String namespace, int maxSubscriptionsPerTopic) throws PulsarAdminException Set the maxSubscriptionsPerTopic for a namespace.- Parameters:
- namespace-
- maxSubscriptionsPerTopic-
- Throws:
- PulsarAdminException
 
- 
setMaxSubscriptionsPerTopicAsyncCompletableFuture<Void> setMaxSubscriptionsPerTopicAsync(String namespace, int maxSubscriptionsPerTopic) Set the maxSubscriptionsPerTopic for a namespace asynchronously.- Parameters:
- namespace-
- maxSubscriptionsPerTopic-
- Returns:
 
- 
removeMaxSubscriptionsPerTopicRemove the maxSubscriptionsPerTopic for a namespace.- Parameters:
- namespace-
- Throws:
- PulsarAdminException
 
- 
removeMaxSubscriptionsPerTopicAsyncRemove the maxSubscriptionsPerTopic for a namespace asynchronously.- Parameters:
- namespace-
- Returns:
 
- 
getMaxProducersPerTopicGet the maxProducersPerTopic for a namespace. Response example:0- Parameters:
- namespace- Namespace name
- Throws:
- PulsarAdminException.NotAuthorizedException- Don't have admin permission
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException- Unexpected error
 
- 
getMaxProducersPerTopicAsyncGet the maxProducersPerTopic for a namespace asynchronously. Response example:0- Parameters:
- namespace- Namespace name
 
- 
setMaxProducersPerTopicvoid setMaxProducersPerTopic(String namespace, int maxProducersPerTopic) throws PulsarAdminException Set maxProducersPerTopic for a namespace. Request example:10- Parameters:
- namespace- Namespace name
- maxProducersPerTopic- maxProducersPerTopic value for a namespace
- Throws:
- PulsarAdminException.NotAuthorizedException- Don't have admin permission
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException- Unexpected error
 
- 
setMaxProducersPerTopicAsyncSet maxProducersPerTopic for a namespace asynchronously. Request example:10- Parameters:
- namespace- Namespace name
- maxProducersPerTopic- maxProducersPerTopic value for a namespace
 
- 
removeMaxProducersPerTopicRemove maxProducersPerTopic for a namespace.- Parameters:
- namespace- Namespace name
- Throws:
- PulsarAdminException.NotAuthorizedException- Don't have admin permission
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException- Unexpected error
 
- 
removeMaxProducersPerTopicAsyncSet maxProducersPerTopic for a namespace asynchronously.- Parameters:
- namespace- Namespace name
 
- 
getMaxConsumersPerTopicGet the maxProducersPerTopic for a namespace. Response example:0- Parameters:
- namespace- Namespace name
- Throws:
- PulsarAdminException.NotAuthorizedException- Don't have admin permission
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException- Unexpected error
 
- 
getMaxConsumersPerTopicAsyncGet the maxProducersPerTopic for a namespace asynchronously. Response example:0- Parameters:
- namespace- Namespace name
 
- 
setMaxConsumersPerTopicvoid setMaxConsumersPerTopic(String namespace, int maxConsumersPerTopic) throws PulsarAdminException Set maxConsumersPerTopic for a namespace. Request example:10- Parameters:
- namespace- Namespace name
- maxConsumersPerTopic- maxConsumersPerTopic value for a namespace
- Throws:
- PulsarAdminException.NotAuthorizedException- Don't have admin permission
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException- Unexpected error
 
- 
setMaxConsumersPerTopicAsyncSet maxConsumersPerTopic for a namespace asynchronously. Request example:10- Parameters:
- namespace- Namespace name
- maxConsumersPerTopic- maxConsumersPerTopic value for a namespace
 
- 
removeMaxConsumersPerTopicRemove maxConsumersPerTopic for a namespace.- Parameters:
- namespace-
- Throws:
- PulsarAdminException
 
- 
removeMaxConsumersPerTopicAsyncRemove maxConsumersPerTopic for a namespace asynchronously.- Parameters:
- namespace-
- Returns:
 
- 
getMaxConsumersPerSubscriptionGet the maxConsumersPerSubscription for a namespace. Response example:0- Parameters:
- namespace- Namespace name
- Throws:
- PulsarAdminException.NotAuthorizedException- Don't have admin permission
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException- Unexpected error
 
- 
getMaxConsumersPerSubscriptionAsyncGet the maxConsumersPerSubscription for a namespace asynchronously. Response example:0- Parameters:
- namespace- Namespace name
 
- 
setMaxConsumersPerSubscriptionvoid setMaxConsumersPerSubscription(String namespace, int maxConsumersPerSubscription) throws PulsarAdminException Set maxConsumersPerSubscription for a namespace. Request example:10- Parameters:
- namespace- Namespace name
- maxConsumersPerSubscription- maxConsumersPerSubscription value for a namespace
- Throws:
- PulsarAdminException.NotAuthorizedException- Don't have admin permission
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException- Unexpected error
 
- 
setMaxConsumersPerSubscriptionAsyncCompletableFuture<Void> setMaxConsumersPerSubscriptionAsync(String namespace, int maxConsumersPerSubscription) Set maxConsumersPerSubscription for a namespace asynchronously. Request example:10- Parameters:
- namespace- Namespace name
- maxConsumersPerSubscription- maxConsumersPerSubscription value for a namespace
 
- 
removeMaxConsumersPerSubscriptionRemove maxConsumersPerSubscription for a namespace.- Parameters:
- namespace-
- Throws:
- PulsarAdminException
 
- 
removeMaxConsumersPerSubscriptionAsyncRemove maxConsumersPerSubscription for a namespace asynchronously.- Parameters:
- namespace-
- Returns:
 
- 
getMaxUnackedMessagesPerConsumerGet the maxUnackedMessagesPerConsumer for a namespace. Response example:0- Parameters:
- namespace- Namespace name
- Throws:
- PulsarAdminException.NotAuthorizedException- Don't have admin permission
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException- Unexpected error
 
- 
getMaxUnackedMessagesPerConsumerAsyncGet the maxUnackedMessagesPerConsumer for a namespace asynchronously. Response example:0- Parameters:
- namespace- Namespace name
 
- 
setMaxUnackedMessagesPerConsumervoid setMaxUnackedMessagesPerConsumer(String namespace, int maxUnackedMessagesPerConsumer) throws PulsarAdminException Set maxUnackedMessagesPerConsumer for a namespace. Request example:10- Parameters:
- namespace- Namespace name
- maxUnackedMessagesPerConsumer- maxUnackedMessagesPerConsumer value for a namespace
- Throws:
- PulsarAdminException.NotAuthorizedException- Don't have admin permission
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException- Unexpected error
 
- 
setMaxUnackedMessagesPerConsumerAsyncCompletableFuture<Void> setMaxUnackedMessagesPerConsumerAsync(String namespace, int maxUnackedMessagesPerConsumer) Set maxUnackedMessagesPerConsumer for a namespace asynchronously. Request example:10- Parameters:
- namespace- Namespace name
- maxUnackedMessagesPerConsumer- maxUnackedMessagesPerConsumer value for a namespace
 
- 
removeMaxUnackedMessagesPerConsumerRemove maxUnackedMessagesPerConsumer for a namespace.- Parameters:
- namespace-
- Throws:
- PulsarAdminException
 
- 
removeMaxUnackedMessagesPerConsumerAsyncRemove maxUnackedMessagesPerConsumer for a namespace asynchronously.- Parameters:
- namespace-
- Returns:
 
- 
getMaxUnackedMessagesPerSubscriptionGet the maxUnackedMessagesPerSubscription for a namespace. Response example:0- Parameters:
- namespace- Namespace name
- Throws:
- PulsarAdminException.NotAuthorizedException- Don't have admin permission
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException- Unexpected error
 
- 
getMaxUnackedMessagesPerSubscriptionAsyncGet the maxUnackedMessagesPerSubscription for a namespace asynchronously. Response example:0- Parameters:
- namespace- Namespace name
 
- 
setMaxUnackedMessagesPerSubscriptionvoid setMaxUnackedMessagesPerSubscription(String namespace, int maxUnackedMessagesPerSubscription) throws PulsarAdminException Set maxUnackedMessagesPerSubscription for a namespace. Request example:10- Parameters:
- namespace- Namespace name
- maxUnackedMessagesPerSubscription- Max number of unacknowledged messages allowed per shared subscription.
- Throws:
- PulsarAdminException.NotAuthorizedException- Don't have admin permission
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException- Unexpected error
 
- 
setMaxUnackedMessagesPerSubscriptionAsyncCompletableFuture<Void> setMaxUnackedMessagesPerSubscriptionAsync(String namespace, int maxUnackedMessagesPerSubscription) Set maxUnackedMessagesPerSubscription for a namespace asynchronously. Request example:10- Parameters:
- namespace- Namespace name
- maxUnackedMessagesPerSubscription- Max number of unacknowledged messages allowed per shared subscription.
 
- 
removeMaxUnackedMessagesPerSubscriptionRemove maxUnackedMessagesPerSubscription for a namespace.- Parameters:
- namespace-
- Throws:
- PulsarAdminException
 
- 
removeMaxUnackedMessagesPerSubscriptionAsyncRemove maxUnackedMessagesPerSubscription for a namespace asynchronously.- Parameters:
- namespace-
- Returns:
 
- 
getCompactionThresholdGet 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 permission
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException- Unexpected error
 
- 
getCompactionThresholdAsyncGet 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
 
- 
setCompactionThresholdSet 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 name
- compactionThreshold- maximum number of backlog bytes before compaction is triggered
- Throws:
- PulsarAdminException.NotAuthorizedException- Don't have admin permission
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException- Unexpected error
 
- 
setCompactionThresholdAsyncSet 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 name
- compactionThreshold- maximum number of backlog bytes before compaction is triggered
 
- 
removeCompactionThresholdDelete the compactionThreshold for a namespace.- Parameters:
- namespace-
- Throws:
- PulsarAdminException
 
- 
removeCompactionThresholdAsyncDelete the compactionThreshold for a namespace asynchronously.- Parameters:
- namespace-
- Returns:
 
- 
getOffloadThresholdGet 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 permission
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException- Unexpected error
 
- 
getOffloadThresholdAsyncGet 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
 
- 
getOffloadThresholdInSecondsGet the offloadThresholdInSeconds for a namespace. Response example:10000000- Parameters:
- namespace- Namespace name
- Throws:
- PulsarAdminException.NotAuthorizedException- Don't have admin permission
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException- Unexpected error
 
- 
getOffloadThresholdInSecondsAsyncGet the offloadThresholdInSeconds for a namespace. Response example:10000000- Parameters:
- namespace- Namespace name
 
- 
setOffloadThresholdSet 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 name
- offloadThreshold- maximum number of bytes stored before offloading is triggered
- Throws:
- PulsarAdminException.NotAuthorizedException- Don't have admin permission
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException- Unexpected error
 
- 
setOffloadThresholdAsyncSet 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 name
- offloadThreshold- maximum number of bytes stored before offloading is triggered
 
- 
setOffloadThresholdInSecondsvoid 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 name
- offloadThresholdInSeconds- maximum number of bytes stored before offloading is triggered
- Throws:
- PulsarAdminException.NotAuthorizedException- Don't have admin permission
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException- Unexpected error
 
- 
setOffloadThresholdInSecondsAsyncCompletableFuture<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 name
- offloadThresholdInSeconds- maximum number of seconds stored before offloading is triggered
 
- 
getOffloadDeleteLagMsGet 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 permission
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException- Unexpected error
 
- 
getOffloadDeleteLagMsAsyncGet 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
 
- 
setOffloadDeleteLagSet 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 name
- lag- the duration to wait before deleting the local copy
- unit- the timeunit of the duration
- Throws:
- PulsarAdminException.NotAuthorizedException- Don't have admin permission
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException- Unexpected error
 
- 
setOffloadDeleteLagAsyncSet 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 name
- lag- the duration to wait before deleting the local copy
- unit- the timeunit of the duration
 
- 
clearOffloadDeleteLagClear 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 permission
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException- Unexpected error
 
- 
clearOffloadDeleteLagAsyncClear 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 permission
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException- 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 set
- strategy-
- Throws:
- PulsarAdminException.NotAuthorizedException- Don't have admin permission
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException- Unexpected error
 
- 
getSchemaValidationEnforcedGet schema validation enforced for namespace.- Parameters:
- namespace- namespace for this command.
- Returns:
- the schema validation enforced flag
- Throws:
- PulsarAdminException.NotAuthorizedException- Don't have admin permission
- PulsarAdminException.NotFoundException- Tenant or Namespace does not exist
- PulsarAdminException- Unexpected error
 
- 
getSchemaValidationEnforcedAsyncGet schema validation enforced for namespace asynchronously.- Parameters:
- namespace- namespace for this command.
- Returns:
- the schema validation enforced flag
 
- 
getSchemaValidationEnforcedGet 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 permission
- PulsarAdminException.NotFoundException- Tenant or Namespace does not exist
- PulsarAdminException- Unexpected error
 
- 
getSchemaValidationEnforcedAsyncGet schema validation enforced for namespace asynchronously.- Parameters:
- namespace- namespace for this command.
- applied- applied for this command.
- Returns:
- the schema validation enforced flag
 
- 
setSchemaValidationEnforcedvoid 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 name
- schemaValidationEnforced- flag to enable or disable schema validation for the given namespace
- Throws:
- PulsarAdminException.NotAuthorizedException- Don't have admin permission
- PulsarAdminException.NotFoundException- Tenant or Namespace does not exist
- PulsarAdminException- Unexpected error
 
- 
setSchemaValidationEnforcedAsyncCompletableFuture<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 name
- schemaValidationEnforced- flag to enable or disable schema validation for the given namespace
 
- 
getSchemaCompatibilityStrategySchemaCompatibilityStrategy 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 permission
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException- Unexpected error
 
- 
getSchemaCompatibilityStrategyAsyncCompletableFuture<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
 
- 
setSchemaCompatibilityStrategyvoid 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 set
- strategy- The schema compatibility strategy
- Throws:
- PulsarAdminException.NotAuthorizedException- Don't have admin permission
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException- Unexpected error
 
- 
setSchemaCompatibilityStrategyAsyncCompletableFuture<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 set
- strategy- The schema compatibility strategy
 
- 
getIsAllowAutoUpdateSchemaGet whether allow auto update schema.- Parameters:
- namespace- pulsar namespace name
- Returns:
- the schema validation enforced flag
- Throws:
- PulsarAdminException.NotAuthorizedException- Don't have admin permission
- PulsarAdminException.NotFoundException- Tenant or Namespace does not exist
- PulsarAdminException- Unexpected error
 
- 
getIsAllowAutoUpdateSchemaAsyncGet whether allow auto update schema asynchronously.- Parameters:
- namespace- pulsar namespace name
- Returns:
- the schema validation enforced flag
 
- 
setIsAllowAutoUpdateSchemavoid 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 name
- isAllowAutoUpdateSchema- flag to enable or disable auto update schema
- Throws:
- PulsarAdminException.NotAuthorizedException- Don't have admin permission
- PulsarAdminException.NotFoundException- Tenant or Namespace does not exist
- PulsarAdminException- Unexpected error
 
- 
setIsAllowAutoUpdateSchemaAsyncCompletableFuture<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 name
- isAllowAutoUpdateSchema- flag to enable or disable auto update schema
 
- 
setOffloadPoliciesvoid 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 name
- offloadPolicies- Offload configuration
- Throws:
- PulsarAdminException.NotAuthorizedException- Don't have admin permission
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException.ConflictException- Concurrent modification
- PulsarAdminException- Unexpected error
 
- 
removeOffloadPoliciesRemove 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 permission
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException.ConflictException- Concurrent modification
- PulsarAdminException- Unexpected error
 
- 
setOffloadPoliciesAsyncSet 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 name
- offloadPolicies- Offload configuration
 
- 
removeOffloadPoliciesAsyncRemove 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 permission
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException.ConflictException- Concurrent modification
- PulsarAdminException- Unexpected error
 
- 
getOffloadPoliciesGet 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 permission
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException.ConflictException- Concurrent modification
- PulsarAdminException- Unexpected error
 
- 
getOffloadPoliciesAsyncGet 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
 
- 
getMaxTopicsPerNamespaceGet maxTopicsPerNamespace for a namespace. Response example:0- Parameters:
- namespace- Namespace name
- Returns:
- Throws:
- PulsarAdminException.NotAuthorizedException- Don't have admin permission
- PulsarAdminException.NotFoundException- Namespace dost not exist
- PulsarAdminException- Unexpected error
 
- 
getMaxTopicsPerNamespaceAsyncGet maxTopicsPerNamespace for a namespace asynchronously. Response example:0- Parameters:
- namespace- Namespace name
- Returns:
 
- 
setMaxTopicsPerNamespacevoid setMaxTopicsPerNamespace(String namespace, int maxTopicsPerNamespace) throws PulsarAdminException Set maxTopicsPerNamespace for a namespace. Request example:100- Parameters:
- namespace- Namespace name
- maxTopicsPerNamespace- maxTopicsPerNamespace value for a namespace
- Throws:
- PulsarAdminException.NotAuthorizedException- Don't have admin permission
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException- Unexpected error
 
- 
setMaxTopicsPerNamespaceAsyncSet maxTopicsPerNamespace for a namespace asynchronously. Request example:100- Parameters:
- namespace- Namespace name
- maxTopicsPerNamespace- maxTopicsPerNamespace value for a namespace
- Returns:
 
- 
removeMaxTopicsPerNamespaceremove maxTopicsPerNamespace for a namespace.- Parameters:
- namespace- Namespace name
- Throws:
- PulsarAdminException.NotAuthorizedException- Don't have admin permission
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException- Unexpected error
 
- 
removeMaxTopicsPerNamespaceAsyncremove maxTopicsPerNamespace for a namespace asynchronously.- Parameters:
- namespace- Namespace name
- Throws:
- PulsarAdminException.NotAuthorizedException- Don't have admin permission
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException- Unexpected error
 
- 
setPropertyAsyncSet 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 name
- key- key of the property
- value- value of the property
 
- 
setPropertySet 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 name
- key- key of the property
- value- value of the property
- Throws:
- PulsarAdminException
 
- 
setPropertiesAsyncSet 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 name
- properties- key value pair properties
 
- 
setPropertiesSet 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 name
- properties- key value pair properties
- Throws:
- PulsarAdminException
 
- 
getPropertyAsyncGet 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 name
- key- key of the property
- Returns:
- value of the property.
 
- 
getPropertyGet 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 name
- key- key of the property
- Returns:
- value of the property.
- Throws:
- PulsarAdminException
 
- 
getPropertiesAsyncGet all properties of a namespace asynchronously. Example:admin.namespaces().getPropertiesAsync();- Parameters:
- namespace- Namespace name
- Returns:
- key value pair properties.
 
- 
getPropertiesGet all properties of a namespace. Example:admin.namespaces().getProperties();- Parameters:
- namespace- Namespace name
- Returns:
- key value pair properties.
- Throws:
- PulsarAdminException
 
- 
removePropertyAsyncRemove 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 name
- key- key of the property
- Returns:
- value of the property.
 
- 
removePropertyRemove 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 name
- key- key of the property
- Returns:
- value of the property.
- Throws:
- PulsarAdminException
 
- 
clearPropertiesAsyncClear all properties of a namespace asynchronously. Example:admin.namespaces().clearPropertiesAsync();- Parameters:
- namespace- Namespace name
 
- 
clearPropertiesClear all properties of a namespace. Example:admin.namespaces().clearProperties();- Parameters:
- namespace- Namespace name
- Throws:
- PulsarAdminException
 
- 
getNamespaceResourceGroupGet the ResourceGroup for a namespace. Response example:60- Parameters:
- namespace- Namespace name
- Returns:
- Throws:
- PulsarAdminException.NotAuthorizedException- Don't have admin permission
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException- Unexpected error
 
- 
getNamespaceResourceGroupAsyncGet the ResourceGroup for a namespace asynchronously. Response example:60- Parameters:
- namespace- Namespace name
 
- 
setNamespaceResourceGroupvoid setNamespaceResourceGroup(String namespace, String resourcegroupname) throws PulsarAdminException Set the ResourceGroup for a namespace. Request example:60- Parameters:
- namespace- Namespace name
- resourcegroupname- ResourceGroup name
- Throws:
- PulsarAdminException.NotAuthorizedException- Don't have admin permission
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException- Unexpected error
 
- 
setNamespaceResourceGroupAsyncSet the ResourceGroup for a namespace asynchronously. Request example:60- Parameters:
- namespace- Namespace name
- resourcegroupname- TTL values for all messages for all topics in this namespace
 
- 
removeNamespaceResourceGroupRemove the ResourceGroup on a namespace.- Parameters:
- namespace-
- Throws:
- PulsarAdminException
 
- 
removeNamespaceResourceGroupAsyncRemove the ResourceGroup on a namespace asynchronously.- Parameters:
- namespace-
- Returns:
 
- 
getNamespaceEntryFiltersGet entry filters for a namespace.- Parameters:
- namespace-
- Returns:
- entry filters classes info.
- Throws:
- PulsarAdminException
 
- 
getNamespaceEntryFiltersAsyncGet entry filters for a namespace asynchronously.- Parameters:
- namespace-
- Returns:
- entry filters classes info.
 
- 
setNamespaceEntryFiltersvoid setNamespaceEntryFilters(String namespace, EntryFilters entryFilters) throws PulsarAdminException Set entry filters on a namespace.- Parameters:
- namespace- Namespace name
- entryFilters- The entry filters
- Throws:
- PulsarAdminException
 
- 
setNamespaceEntryFiltersAsyncSet entry filters on a namespace asynchronously.- Parameters:
- namespace- Namespace name
- entryFilters- The entry filters
 
- 
removeNamespaceEntryFiltersremove entry filters of a namespace.- Parameters:
- namespace- Namespace name
- Throws:
- PulsarAdminException
 
- 
removeNamespaceEntryFiltersAsyncremove entry filters of a namespace asynchronously.- Parameters:
- namespace- Namespace name
- Returns:
 
- 
updateMigrationStateEnable migration for all topics within a namespace. Migrate all topics of a namespace to new broker. Request example:true- Parameters:
- namespace- Namespace name
- migrated- Flag to determine namespace is migrated or not
- Throws:
- PulsarAdminException.NotAuthorizedException- Don't have admin permission
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException- Unexpected error
 
- 
setDispatcherPauseOnAckStatePersistentAsyncSet DispatcherPauseOnAckStatePersistent for a namespace asynchronously.
- 
setDispatcherPauseOnAckStatePersistentRemove entry filters of a namespace.- Parameters:
- namespace- Namespace name
- Throws:
- PulsarAdminException
 
- 
removeDispatcherPauseOnAckStatePersistentAsyncRemoves the dispatcherPauseOnAckStatePersistentEnabled policy for a given namespace asynchronously.
- 
removeDispatcherPauseOnAckStatePersistentRemoves the dispatcherPauseOnAckStatePersistentEnabled policy for a given namespace.- Throws:
- PulsarAdminException
 
- 
getDispatcherPauseOnAckStatePersistentAsyncGet the dispatcherPauseOnAckStatePersistentEnabled policy for a given namespace asynchronously.
- 
getDispatcherPauseOnAckStatePersistentGet the dispatcherPauseOnAckStatePersistentEnabled policy for a given namespace.- Throws:
- PulsarAdminException
 
- 
getNamespaceAllowedClustersGet the allowed clusters for a namespace. Response example:["use", "usw", "usc"]- Parameters:
- namespace- Namespace name
- Throws:
- PulsarAdminException.NotAuthorizedException- Don't have admin permission
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException.PreconditionFailedException- Namespace is not global
- PulsarAdminException- Unexpected error
 
- 
getNamespaceAllowedClustersAsyncGet the allowed clusters for a namespace asynchronously. Response example:["use", "usw", "usc"]- Parameters:
- namespace- Namespace name
 
- 
setNamespaceAllowedClustersvoid setNamespaceAllowedClusters(String namespace, Set<String> clusterIds) throws PulsarAdminException Set the allowed clusters for a namespace. Request example:["us-west", "us-east", "us-cent"]- Parameters:
- namespace- Namespace name
- clusterIds- Pulsar Cluster Ids
- Throws:
- PulsarAdminException.ConflictException- Peer-cluster cannot be part of an allowed-cluster
- PulsarAdminException.NotAuthorizedException- Don't have admin permission
- PulsarAdminException.NotFoundException- Namespace does not exist
- PulsarAdminException.PreconditionFailedException- Namespace is not global
- PulsarAdminException.PreconditionFailedException- Invalid cluster ids
- PulsarAdminException- The list of allowed clusters should include all replication clusters.
- PulsarAdminException- Unexpected error
 
- 
setNamespaceAllowedClustersAsyncSet the allowed clusters for a namespace asynchronously. Request example:["us-west", "us-east", "us-cent"]- Parameters:
- namespace- Namespace name
- clusterIds- Pulsar Cluster Ids
 
 
-