Package org.apache.pulsar.client.admin
Interface Topics
-
public interface TopicsAdmin interface for Topics management.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description LongRunningProcessStatuscompactionStatus(java.lang.String topic)Check the status of an ongoing compaction for a topic.java.util.concurrent.CompletableFuture<LongRunningProcessStatus>compactionStatusAsync(java.lang.String topic)Check the status of an ongoing compaction for a topic asynchronously.voidcreateMissedPartitions(java.lang.String topic)Create missed partitions for partitioned topic.java.util.concurrent.CompletableFuture<java.lang.Void>createMissedPartitionsAsync(java.lang.String topic)Create missed partitions for partitioned topic asynchronously.voidcreateNonPartitionedTopic(java.lang.String topic)Create a non-partitioned topic.java.util.concurrent.CompletableFuture<java.lang.Void>createNonPartitionedTopicAsync(java.lang.String topic)Create a non-partitioned topic asynchronously.voidcreatePartitionedTopic(java.lang.String topic, int numPartitions)Create a partitioned topic.java.util.concurrent.CompletableFuture<java.lang.Void>createPartitionedTopicAsync(java.lang.String topic, int numPartitions)Create a partitioned topic asynchronously.voidcreateSubscription(java.lang.String topic, java.lang.String subscriptionName, org.apache.pulsar.client.api.MessageId messageId)Create a new subscription on a topic.java.util.concurrent.CompletableFuture<java.lang.Void>createSubscriptionAsync(java.lang.String topic, java.lang.String subscriptionName, org.apache.pulsar.client.api.MessageId messageId)Create a new subscription on a topic.voiddelete(java.lang.String topic)Delete a topic.default voiddelete(java.lang.String topic, boolean force)voiddelete(java.lang.String topic, boolean force, boolean deleteSchema)Delete a topic.java.util.concurrent.CompletableFuture<java.lang.Void>deleteAsync(java.lang.String topic)Delete a topic asynchronously.default java.util.concurrent.CompletableFuture<java.lang.Void>deleteAsync(java.lang.String topic, boolean force)java.util.concurrent.CompletableFuture<java.lang.Void>deleteAsync(java.lang.String topic, boolean force, boolean deleteSchema)Delete a topic asynchronously.voiddeletePartitionedTopic(java.lang.String topic)Delete a partitioned topic.default voiddeletePartitionedTopic(java.lang.String topic, boolean force)voiddeletePartitionedTopic(java.lang.String topic, boolean force, boolean deleteSchema)Delete a partitioned topic.java.util.concurrent.CompletableFuture<java.lang.Void>deletePartitionedTopicAsync(java.lang.String topic)Delete a partitioned topic asynchronously.default java.util.concurrent.CompletableFuture<java.lang.Void>deletePartitionedTopicAsync(java.lang.String topic, boolean force)java.util.concurrent.CompletableFuture<java.lang.Void>deletePartitionedTopicAsync(java.lang.String topic, boolean force, boolean deleteSchema)Delete a partitioned topic asynchronously.voiddeleteSubscription(java.lang.String topic, java.lang.String subName)Delete a subscription.voiddeleteSubscription(java.lang.String topic, java.lang.String subName, boolean force)Delete a subscription.java.util.concurrent.CompletableFuture<java.lang.Void>deleteSubscriptionAsync(java.lang.String topic, java.lang.String subName)Delete a subscription asynchronously.java.util.concurrent.CompletableFuture<java.lang.Void>deleteSubscriptionAsync(java.lang.String topic, java.lang.String subName, boolean force)Delete a subscription asynchronously.voiddisableDeduplication(java.lang.String topic)Deprecated.java.util.concurrent.CompletableFuture<java.lang.Void>disableDeduplicationAsync(java.lang.String topic)Deprecated.voidenableDeduplication(java.lang.String topic, boolean enabled)Deprecated.java.util.concurrent.CompletableFuture<java.lang.Void>enableDeduplicationAsync(java.lang.String topic, boolean enabled)Deprecated.org.apache.pulsar.client.api.Message<byte[]>examineMessage(java.lang.String topic, java.lang.String initialPosition, long messagePosition)Examine a specific message on a topic by position relative to the earliest or the latest message.java.util.concurrent.CompletableFuture<org.apache.pulsar.client.api.Message<byte[]>>examineMessageAsync(java.lang.String topic, java.lang.String initialPosition, long messagePosition)Examine a specific message on a topic by position relative to the earliest or the latest message.voidexpireMessages(java.lang.String topic, java.lang.String subscriptionName, long expireTimeInSeconds)Expire all messages older than given N (expireTimeInSeconds) seconds for a given subscription.voidexpireMessages(java.lang.String topic, java.lang.String subscriptionName, org.apache.pulsar.client.api.MessageId messageId, boolean isExcluded)Expire all messages older than given N (expireTimeInSeconds) seconds for a given subscription.java.util.concurrent.CompletableFuture<java.lang.Void>expireMessagesAsync(java.lang.String topic, java.lang.String subscriptionName, long expireTimeInSeconds)Expire all messages older than given N (expireTimeInSeconds) seconds for a given subscription asynchronously.java.util.concurrent.CompletableFuture<java.lang.Void>expireMessagesAsync(java.lang.String topic, java.lang.String subscriptionName, org.apache.pulsar.client.api.MessageId messageId, boolean isExcluded)Expire all messages older than given N (expireTimeInSeconds) seconds for a given subscription asynchronously.voidexpireMessagesForAllSubscriptions(java.lang.String topic, long expireTimeInSeconds)Expire all messages older than given N seconds for all subscriptions of the persistent-topic.java.util.concurrent.CompletableFuture<java.lang.Void>expireMessagesForAllSubscriptionsAsync(java.lang.String topic, long expireTimeInSeconds)Expire all messages older than given N seconds for all subscriptions of the persistent-topic asynchronously.java.util.Map<BacklogQuota.BacklogQuotaType,BacklogQuota>getBacklogQuotaMap(java.lang.String topic)Get backlog quota map for a topic.java.util.Map<BacklogQuota.BacklogQuotaType,BacklogQuota>getBacklogQuotaMap(java.lang.String topic, boolean applied)Get applied backlog quota map for a topic.java.lang.LonggetCompactionThreshold(java.lang.String topic)Get the compactionThreshold for a topic.java.lang.LonggetCompactionThreshold(java.lang.String topic, boolean applied)Get the compactionThreshold for a topic.java.util.concurrent.CompletableFuture<java.lang.Long>getCompactionThresholdAsync(java.lang.String topic)Get the compactionThreshold for a topic asynchronously.java.util.concurrent.CompletableFuture<java.lang.Long>getCompactionThresholdAsync(java.lang.String topic, boolean applied)Get the compactionThreshold for a topic asynchronously.java.lang.BooleangetDeduplicationEnabled(java.lang.String topic)Deprecated.java.util.concurrent.CompletableFuture<java.lang.Boolean>getDeduplicationEnabledAsync(java.lang.String topic)Deprecated.java.lang.IntegergetDeduplicationSnapshotInterval(java.lang.String topic)Get the deduplication snapshot interval for specified topic.java.util.concurrent.CompletableFuture<java.lang.Integer>getDeduplicationSnapshotIntervalAsync(java.lang.String topic)Get the deduplication snapshot interval for specified topic asynchronously.java.lang.BooleangetDeduplicationStatus(java.lang.String topic)get deduplication enabled of a topic.java.lang.BooleangetDeduplicationStatus(java.lang.String topic, boolean applied)get applied deduplication enabled of a topic.java.util.concurrent.CompletableFuture<java.lang.Boolean>getDeduplicationStatusAsync(java.lang.String topic)get deduplication enabled of a topic asynchronously.java.util.concurrent.CompletableFuture<java.lang.Boolean>getDeduplicationStatusAsync(java.lang.String topic, boolean applied)get applied deduplication enabled of a topic asynchronously.DelayedDeliveryPoliciesgetDelayedDeliveryPolicy(java.lang.String topic)Get the delayed delivery policy for a specified topic.DelayedDeliveryPoliciesgetDelayedDeliveryPolicy(java.lang.String topic, boolean applied)Get the delayed delivery policy applied for a specified topic.java.util.concurrent.CompletableFuture<DelayedDeliveryPolicies>getDelayedDeliveryPolicyAsync(java.lang.String topic)Get the delayed delivery policy for a specified topic asynchronously.java.util.concurrent.CompletableFuture<DelayedDeliveryPolicies>getDelayedDeliveryPolicyAsync(java.lang.String topic, boolean applied)Get the delayed delivery policy applied for a specified topic asynchronously.DispatchRategetDispatchRate(java.lang.String topic)Get message-dispatch-rate (topic can dispatch this many messages per second).DispatchRategetDispatchRate(java.lang.String topic, boolean applied)Get applied message-dispatch-rate (topic can dispatch this many messages per second).java.util.concurrent.CompletableFuture<DispatchRate>getDispatchRateAsync(java.lang.String topic)Get message-dispatch-rate asynchronously.java.util.concurrent.CompletableFuture<DispatchRate>getDispatchRateAsync(java.lang.String topic, boolean applied)Get applied message-dispatch-rate asynchronously.InactiveTopicPoliciesgetInactiveTopicPolicies(java.lang.String topic)get inactive topic policies of a topic.InactiveTopicPoliciesgetInactiveTopicPolicies(java.lang.String topic, boolean applied)Get inactive topic policies applied for a topic.java.util.concurrent.CompletableFuture<InactiveTopicPolicies>getInactiveTopicPoliciesAsync(java.lang.String topic)get inactive topic policies of a topic asynchronously.java.util.concurrent.CompletableFuture<InactiveTopicPolicies>getInactiveTopicPoliciesAsync(java.lang.String topic, boolean applied)Get inactive topic policies applied for a topic asynchronously.java.lang.StringgetInternalInfo(java.lang.String topic)Get a JSON representation of the topic metadata stored in ZooKeeper.java.util.concurrent.CompletableFuture<java.lang.String>getInternalInfoAsync(java.lang.String topic)Get a JSON representation of the topic metadata stored in ZooKeeper.PersistentTopicInternalStatsgetInternalStats(java.lang.String topic)Get the internal stats for the topic.PersistentTopicInternalStatsgetInternalStats(java.lang.String topic, boolean metadata)Get the internal stats for the topic.java.util.concurrent.CompletableFuture<PersistentTopicInternalStats>getInternalStatsAsync(java.lang.String topic)Get the internal stats for the topic asynchronously.java.util.concurrent.CompletableFuture<PersistentTopicInternalStats>getInternalStatsAsync(java.lang.String topic, boolean metadata)Get the internal stats for the topic asynchronously.org.apache.pulsar.client.api.MessageIdgetLastMessageId(java.lang.String topic)Get the last commit message Id of a topic.java.util.concurrent.CompletableFuture<org.apache.pulsar.client.api.MessageId>getLastMessageIdAsync(java.lang.String topic)Get the last commit message Id of a topic asynchronously.java.util.List<java.lang.String>getList(java.lang.String namespace)Get the both persistent and non-persistent topics under a namespace.java.util.List<java.lang.String>getList(java.lang.String namespace, TopicDomain topicDomain)Get the list of topics under a namespace.java.util.concurrent.CompletableFuture<java.util.List<java.lang.String>>getListAsync(java.lang.String namespace)Get both persistent and non-persistent topics under a namespace asynchronously.java.util.concurrent.CompletableFuture<java.util.List<java.lang.String>>getListAsync(java.lang.String namespace, TopicDomain topicDomain)Get the list of topics under a namespace asynchronously.java.util.List<java.lang.String>getListInBundle(java.lang.String namespace, java.lang.String bundleRange)Get list of topics exist into given bundle.java.util.concurrent.CompletableFuture<java.util.List<java.lang.String>>getListInBundleAsync(java.lang.String namespace, java.lang.String bundleRange)Get list of topics exist into given bundle asynchronously.java.lang.IntegergetMaxConsumers(java.lang.String topic)Get the max number of consumer for specified topic.java.lang.IntegergetMaxConsumers(java.lang.String topic, boolean applied)Get the max number of consumer applied for specified topic.java.util.concurrent.CompletableFuture<java.lang.Integer>getMaxConsumersAsync(java.lang.String topic)Get the max number of consumer for specified topic asynchronously.java.util.concurrent.CompletableFuture<java.lang.Integer>getMaxConsumersAsync(java.lang.String topic, boolean applied)Get the max number of consumer applied for specified topic asynchronously.java.lang.IntegergetMaxConsumersPerSubscription(java.lang.String topic)Get the maxConsumersPerSubscription for a topic.java.util.concurrent.CompletableFuture<java.lang.Integer>getMaxConsumersPerSubscriptionAsync(java.lang.String topic)Get the maxConsumersPerSubscription for a topic asynchronously.java.lang.IntegergetMaxMessageSize(java.lang.String topic)Get the max message size for specified topic.java.util.concurrent.CompletableFuture<java.lang.Integer>getMaxMessageSizeAsync(java.lang.String topic)Get the max message size for specified topic asynchronously.java.lang.IntegergetMaxProducers(java.lang.String topic)Get the max number of producer for specified topic.java.lang.IntegergetMaxProducers(java.lang.String topic, boolean applied)Get the max number of producer applied for specified topic.java.util.concurrent.CompletableFuture<java.lang.Integer>getMaxProducersAsync(java.lang.String topic)Get the max number of producer for specified topic asynchronously.java.util.concurrent.CompletableFuture<java.lang.Integer>getMaxProducersAsync(java.lang.String topic, boolean applied)Get the max number of producer applied for specified topic asynchronously.java.lang.IntegergetMaxSubscriptionsPerTopic(java.lang.String topic)Get the max number of subscriptions for specified topic.java.util.concurrent.CompletableFuture<java.lang.Integer>getMaxSubscriptionsPerTopicAsync(java.lang.String topic)Get the max number of subscriptions for specified topic asynchronously.java.lang.IntegergetMaxUnackedMessagesOnConsumer(java.lang.String topic)get max unacked messages on consumer of a topic.java.lang.IntegergetMaxUnackedMessagesOnConsumer(java.lang.String topic, boolean applied)get applied max unacked messages on consumer of a topic.java.util.concurrent.CompletableFuture<java.lang.Integer>getMaxUnackedMessagesOnConsumerAsync(java.lang.String topic)get max unacked messages on consumer of a topic asynchronously.java.util.concurrent.CompletableFuture<java.lang.Integer>getMaxUnackedMessagesOnConsumerAsync(java.lang.String topic, boolean applied)get applied max unacked messages on consumer of a topic asynchronously.java.lang.IntegergetMaxUnackedMessagesOnSubscription(java.lang.String topic)get max unacked messages on subscription of a topic.java.lang.IntegergetMaxUnackedMessagesOnSubscription(java.lang.String topic, boolean applied)get max unacked messages on subscription of a topic.java.util.concurrent.CompletableFuture<java.lang.Integer>getMaxUnackedMessagesOnSubscriptionAsync(java.lang.String topic)get max unacked messages on subscription of a topic asynchronously.java.util.concurrent.CompletableFuture<java.lang.Integer>getMaxUnackedMessagesOnSubscriptionAsync(java.lang.String topic, boolean applied)get max unacked messages on subscription of a topic asynchronously.org.apache.pulsar.client.api.Message<byte[]>getMessageById(java.lang.String topic, long ledgerId, long entryId)Get a message by its messageId via a topic subscription.java.util.concurrent.CompletableFuture<org.apache.pulsar.client.api.Message<byte[]>>getMessageByIdAsync(java.lang.String topic, long ledgerId, long entryId)Get a message by its messageId via a topic subscription asynchronously.java.lang.IntegergetMessageTTL(java.lang.String topic)Get message TTL for a topic.java.lang.IntegergetMessageTTL(java.lang.String topic, boolean applied)Get message TTL applied for a topic.OffloadPoliciesgetOffloadPolicies(java.lang.String topic)get offload policies of a topic.OffloadPoliciesgetOffloadPolicies(java.lang.String topic, boolean applied)get applied offload policies of a topic.java.util.concurrent.CompletableFuture<OffloadPolicies>getOffloadPoliciesAsync(java.lang.String topic)get offload policies of a topic asynchronously.java.util.concurrent.CompletableFuture<OffloadPolicies>getOffloadPoliciesAsync(java.lang.String topic, boolean applied)get applied offload policies of a topic asynchronously.PartitionedTopicInternalStatsgetPartitionedInternalStats(java.lang.String topic)Get the stats for the partitioned topic.java.util.concurrent.CompletableFuture<PartitionedTopicInternalStats>getPartitionedInternalStatsAsync(java.lang.String topic)Get the stats-internal for the partitioned topic asynchronously.default PartitionedTopicStatsgetPartitionedStats(java.lang.String topic, boolean perPartition)PartitionedTopicStatsgetPartitionedStats(java.lang.String topic, boolean perPartition, boolean getPreciseBacklog, boolean subscriptionBacklogSize)Get the stats for the partitioned topicdefault java.util.concurrent.CompletableFuture<PartitionedTopicStats>getPartitionedStatsAsync(java.lang.String topic, boolean perPartition)java.util.concurrent.CompletableFuture<PartitionedTopicStats>getPartitionedStatsAsync(java.lang.String topic, boolean perPartition, boolean getPreciseBacklog, boolean subscriptionBacklogSize)Get the stats for the partitioned topic asynchronously.java.util.List<java.lang.String>getPartitionedTopicList(java.lang.String namespace)Get the list of partitioned topics under a namespace.java.util.concurrent.CompletableFuture<java.util.List<java.lang.String>>getPartitionedTopicListAsync(java.lang.String namespace)Get the list of partitioned topics under a namespace asynchronously.PartitionedTopicMetadatagetPartitionedTopicMetadata(java.lang.String topic)Get metadata of a partitioned topic.java.util.concurrent.CompletableFuture<PartitionedTopicMetadata>getPartitionedTopicMetadataAsync(java.lang.String topic)Get metadata of a partitioned topic asynchronously.java.util.Map<java.lang.String,java.util.Set<AuthAction>>getPermissions(java.lang.String topic)Get permissions on a topic.java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.util.Set<AuthAction>>>getPermissionsAsync(java.lang.String topic)Get permissions on a topic asynchronously.PersistencePoliciesgetPersistence(java.lang.String topic)Get the configuration of persistence policies for specified topic.PersistencePoliciesgetPersistence(java.lang.String topic, boolean applied)Get the applied configuration of persistence policies for specified topic.java.util.concurrent.CompletableFuture<PersistencePolicies>getPersistenceAsync(java.lang.String topic)Get the configuration of persistence policies for specified topic asynchronously.java.util.concurrent.CompletableFuture<PersistencePolicies>getPersistenceAsync(java.lang.String topic, boolean applied)Get the applied configuration of persistence policies for specified topic asynchronously.PublishRategetPublishRate(java.lang.String topic)Get message-publish-rate (topics can publish this many messages per second).java.util.concurrent.CompletableFuture<PublishRate>getPublishRateAsync(java.lang.String topic)Get message-publish-rate (topics can publish this many messages per second) asynchronously.DispatchRategetReplicatorDispatchRate(java.lang.String topic)Get replicatorDispatchRate for the topic.DispatchRategetReplicatorDispatchRate(java.lang.String topic, boolean applied)Get applied replicatorDispatchRate for the topic.java.util.concurrent.CompletableFuture<DispatchRate>getReplicatorDispatchRateAsync(java.lang.String topic)Get replicatorDispatchRate asynchronously.java.util.concurrent.CompletableFuture<DispatchRate>getReplicatorDispatchRateAsync(java.lang.String topic, boolean applied)Get applied replicatorDispatchRate asynchronously.RetentionPoliciesgetRetention(java.lang.String topic)Get the retention configuration for a topic.RetentionPoliciesgetRetention(java.lang.String topic, boolean applied)Get the applied retention configuration for a topic.java.util.concurrent.CompletableFuture<RetentionPolicies>getRetentionAsync(java.lang.String topic)Get the retention configuration for a topic asynchronously.java.util.concurrent.CompletableFuture<RetentionPolicies>getRetentionAsync(java.lang.String topic, boolean applied)Get the applied retention configuration for a topic asynchronously.default TopicStatsgetStats(java.lang.String topic)default TopicStatsgetStats(java.lang.String topic, boolean getPreciseBacklog)TopicStatsgetStats(java.lang.String topic, boolean getPreciseBacklog, boolean subscriptionBacklogSize)Get the stats for the topic.default java.util.concurrent.CompletableFuture<TopicStats>getStatsAsync(java.lang.String topic)java.util.concurrent.CompletableFuture<TopicStats>getStatsAsync(java.lang.String topic, boolean getPreciseBacklog, boolean subscriptionBacklogSize)Get the stats for the topic asynchronously.SubscribeRategetSubscribeRate(java.lang.String topic)Get topic-subscribe-rate (topics allow subscribe times per consumer in a period).SubscribeRategetSubscribeRate(java.lang.String topic, boolean applied)Get applied topic-subscribe-rate (topics allow subscribe times per consumer in a period).java.util.concurrent.CompletableFuture<SubscribeRate>getSubscribeRateAsync(java.lang.String topic)Get topic-subscribe-rate asynchronously.java.util.concurrent.CompletableFuture<SubscribeRate>getSubscribeRateAsync(java.lang.String topic, boolean applied)Get applied topic-subscribe-rate asynchronously.DispatchRategetSubscriptionDispatchRate(java.lang.String topic)Get subscription-message-dispatch-rate for the topic.DispatchRategetSubscriptionDispatchRate(java.lang.String namespace, boolean applied)Get applied subscription-message-dispatch-rate.java.util.concurrent.CompletableFuture<DispatchRate>getSubscriptionDispatchRateAsync(java.lang.String topic)Get subscription-message-dispatch-rate asynchronously.java.util.concurrent.CompletableFuture<DispatchRate>getSubscriptionDispatchRateAsync(java.lang.String namespace, boolean applied)Get applied subscription-message-dispatch-rate asynchronously.java.util.List<java.lang.String>getSubscriptions(java.lang.String topic)Get the list of subscriptions.java.util.concurrent.CompletableFuture<java.util.List<java.lang.String>>getSubscriptionsAsync(java.lang.String topic)Get the list of subscriptions asynchronously.java.util.Set<org.apache.pulsar.client.api.SubscriptionType>getSubscriptionTypesEnabled(java.lang.String topic)Get is enable sub types.java.util.concurrent.CompletableFuture<java.util.Set<org.apache.pulsar.client.api.SubscriptionType>>getSubscriptionTypesEnabledAsync(java.lang.String topic)Get is enable sub types asynchronously.voidgrantPermission(java.lang.String topic, java.lang.String role, java.util.Set<AuthAction> actions)Grant permission on a topic.java.util.concurrent.CompletableFuture<java.lang.Void>grantPermissionAsync(java.lang.String topic, java.lang.String role, java.util.Set<AuthAction> actions)Grant permission on a topic asynchronously.OffloadProcessStatusoffloadStatus(java.lang.String topic)Check the status of an ongoing offloading operation for a topic.java.util.concurrent.CompletableFuture<OffloadProcessStatus>offloadStatusAsync(java.lang.String topic)Check the status of an ongoing offloading operation for a topic asynchronously.java.util.List<org.apache.pulsar.client.api.Message<byte[]>>peekMessages(java.lang.String topic, java.lang.String subName, int numMessages)Peek messages from a topic subscription.java.util.concurrent.CompletableFuture<java.util.List<org.apache.pulsar.client.api.Message<byte[]>>>peekMessagesAsync(java.lang.String topic, java.lang.String subName, int numMessages)Peek messages from a topic subscription asynchronously.voidremoveBacklogQuota(java.lang.String topic)Remove a backlog quota policy from a topic.voidremoveCompactionThreshold(java.lang.String topic)Remove the compactionThreshold for a topic.java.util.concurrent.CompletableFuture<java.lang.Void>removeCompactionThresholdAsync(java.lang.String topic)Remove the compactionThreshold for a topic asynchronously.voidremoveDeduplicationSnapshotInterval(java.lang.String topic)Remove the deduplication snapshot interval for specified topic.java.util.concurrent.CompletableFuture<java.lang.Void>removeDeduplicationSnapshotIntervalAsync(java.lang.String topic)Remove the deduplication snapshot interval for specified topic asynchronously.voidremoveDeduplicationStatus(java.lang.String topic)remove deduplication enabled of a topic.java.util.concurrent.CompletableFuture<java.lang.Void>removeDeduplicationStatusAsync(java.lang.String topic)remove deduplication enabled of a topic asynchronously.voidremoveDelayedDeliveryPolicy(java.lang.String topic)Remove the delayed delivery policy for a specified topic.java.util.concurrent.CompletableFuture<java.lang.Void>removeDelayedDeliveryPolicyAsync(java.lang.String topic)Remove the delayed delivery policy for a specified topic asynchronously.voidremoveDispatchRate(java.lang.String topic)Remove message-dispatch-rate.java.util.concurrent.CompletableFuture<java.lang.Void>removeDispatchRateAsync(java.lang.String topic)Remove message-dispatch-rate asynchronously.voidremoveInactiveTopicPolicies(java.lang.String topic)remove inactive topic policies of a topic.java.util.concurrent.CompletableFuture<java.lang.Void>removeInactiveTopicPoliciesAsync(java.lang.String topic)remove inactive topic policies of a topic asynchronously.voidremoveMaxConsumers(java.lang.String topic)Remove the max number of consumer for specified topic.java.util.concurrent.CompletableFuture<java.lang.Void>removeMaxConsumersAsync(java.lang.String topic)Remove the max number of consumer for specified topic asynchronously.voidremoveMaxConsumersPerSubscription(java.lang.String topic)Remove the maxConsumersPerSubscription for a topic.java.util.concurrent.CompletableFuture<java.lang.Void>removeMaxConsumersPerSubscriptionAsync(java.lang.String topic)Remove the maxConsumersPerSubscription for a topic asynchronously.voidremoveMaxMessageSize(java.lang.String topic)Remove the max message size for specified topic.java.util.concurrent.CompletableFuture<java.lang.Void>removeMaxMessageSizeAsync(java.lang.String topic)Remove the max message size for specified topic asynchronously.voidremoveMaxProducers(java.lang.String topic)Remove the max number of producer for specified topic.java.util.concurrent.CompletableFuture<java.lang.Void>removeMaxProducersAsync(java.lang.String topic)Remove the max number of producer for specified topic asynchronously.voidremoveMaxSubscriptionsPerTopic(java.lang.String topic)Remove the max number of subscriptions for specified topic.java.util.concurrent.CompletableFuture<java.lang.Void>removeMaxSubscriptionsPerTopicAsync(java.lang.String topic)Remove the max number of subscriptions for specified topic asynchronously.voidremoveMaxUnackedMessagesOnConsumer(java.lang.String topic)remove max unacked messages on consumer of a topic.java.util.concurrent.CompletableFuture<java.lang.Void>removeMaxUnackedMessagesOnConsumerAsync(java.lang.String topic)remove max unacked messages on consumer of a topic asynchronously.voidremoveMaxUnackedMessagesOnSubscription(java.lang.String topic)remove max unacked messages on subscription of a topic.java.util.concurrent.CompletableFuture<java.lang.Void>removeMaxUnackedMessagesOnSubscriptionAsync(java.lang.String topic)remove max unacked messages on subscription of a topic asynchronously.voidremoveMessageTTL(java.lang.String topic)Remove message TTL for a topic.voidremoveOffloadPolicies(java.lang.String topic)remove offload policies of a topic.java.util.concurrent.CompletableFuture<java.lang.Void>removeOffloadPoliciesAsync(java.lang.String topic)remove offload policies of a topic asynchronously.voidremovePersistence(java.lang.String topic)Remove the configuration of persistence policies for specified topic.java.util.concurrent.CompletableFuture<java.lang.Void>removePersistenceAsync(java.lang.String topic)Remove the configuration of persistence policies for specified topic asynchronously.voidremovePublishRate(java.lang.String topic)Remove message-publish-rate.java.util.concurrent.CompletableFuture<java.lang.Void>removePublishRateAsync(java.lang.String topic)Remove message-publish-rate asynchronously.voidremoveReplicatorDispatchRate(java.lang.String topic)Remove replicatorDispatchRate for a topic.java.util.concurrent.CompletableFuture<java.lang.Void>removeReplicatorDispatchRateAsync(java.lang.String topic)Remove replicatorDispatchRate for a topic asynchronously.voidremoveRetention(java.lang.String topic)Remove the retention configuration for all the topics on a topic.java.util.concurrent.CompletableFuture<java.lang.Void>removeRetentionAsync(java.lang.String topic)Remove the retention configuration for all the topics on a topic asynchronously.voidremoveSubscribeRate(java.lang.String topic)Remove topic-subscribe-rate.java.util.concurrent.CompletableFuture<java.lang.Void>removeSubscribeRateAsync(java.lang.String topic)Remove topic-subscribe-rate asynchronously.voidremoveSubscriptionDispatchRate(java.lang.String topic)Remove subscription-message-dispatch-rate for a topic.java.util.concurrent.CompletableFuture<java.lang.Void>removeSubscriptionDispatchRateAsync(java.lang.String topic)Remove subscription-message-dispatch-rate for a topic asynchronously.voidresetCursor(java.lang.String topic, java.lang.String subName, long timestamp)Reset cursor position on a topic subscription.voidresetCursor(java.lang.String topic, java.lang.String subName, org.apache.pulsar.client.api.MessageId messageId)Reset cursor position on a topic subscription.voidresetCursor(java.lang.String topic, java.lang.String subName, org.apache.pulsar.client.api.MessageId messageId, boolean isExcluded)Reset cursor position on a topic subscription.java.util.concurrent.CompletableFuture<java.lang.Void>resetCursorAsync(java.lang.String topic, java.lang.String subName, long timestamp)Reset cursor position on a topic subscription.java.util.concurrent.CompletableFuture<java.lang.Void>resetCursorAsync(java.lang.String topic, java.lang.String subName, org.apache.pulsar.client.api.MessageId messageId)Reset cursor position on a topic subscription.java.util.concurrent.CompletableFuture<java.lang.Void>resetCursorAsync(java.lang.String topic, java.lang.String subName, org.apache.pulsar.client.api.MessageId messageId, boolean isExcluded)Reset cursor position on a topic subscription.voidrevokePermissions(java.lang.String topic, java.lang.String role)Revoke permissions on a topic.java.util.concurrent.CompletableFuture<java.lang.Void>revokePermissionsAsync(java.lang.String topic, java.lang.String role)Revoke permissions on a topic asynchronously.voidsetBacklogQuota(java.lang.String topic, BacklogQuota backlogQuota)Set a backlog quota for a topic.voidsetCompactionThreshold(java.lang.String topic, long compactionThreshold)Set the compactionThreshold for a topic.java.util.concurrent.CompletableFuture<java.lang.Void>setCompactionThresholdAsync(java.lang.String topic, long compactionThreshold)Set the compactionThreshold for a topic asynchronously.voidsetDeduplicationSnapshotInterval(java.lang.String topic, int interval)Set the deduplication snapshot interval for specified topic.java.util.concurrent.CompletableFuture<java.lang.Void>setDeduplicationSnapshotIntervalAsync(java.lang.String topic, int interval)Set the deduplication snapshot interval for specified topic asynchronously.voidsetDeduplicationStatus(java.lang.String topic, boolean enabled)set deduplication enabled of a topic.java.util.concurrent.CompletableFuture<java.lang.Void>setDeduplicationStatusAsync(java.lang.String topic, boolean enabled)set deduplication enabled of a topic asynchronously.voidsetDelayedDeliveryPolicy(java.lang.String topic, DelayedDeliveryPolicies delayedDeliveryPolicies)Set the delayed delivery policy for a specified topic.java.util.concurrent.CompletableFuture<java.lang.Void>setDelayedDeliveryPolicyAsync(java.lang.String topic, DelayedDeliveryPolicies delayedDeliveryPolicies)Set the delayed delivery policy for a specified topic asynchronously.voidsetDispatchRate(java.lang.String topic, DispatchRate dispatchRate)Set message-dispatch-rate (topic can dispatch this many messages per second).java.util.concurrent.CompletableFuture<java.lang.Void>setDispatchRateAsync(java.lang.String topic, DispatchRate dispatchRate)Set message-dispatch-rate asynchronously.voidsetInactiveTopicPolicies(java.lang.String topic, InactiveTopicPolicies inactiveTopicPolicies)set inactive topic policies of a topic.java.util.concurrent.CompletableFuture<java.lang.Void>setInactiveTopicPoliciesAsync(java.lang.String topic, InactiveTopicPolicies inactiveTopicPolicies)set inactive topic policies of a topic asynchronously.voidsetMaxConsumers(java.lang.String topic, int maxConsumers)Set the max number of consumer for specified topic.java.util.concurrent.CompletableFuture<java.lang.Void>setMaxConsumersAsync(java.lang.String topic, int maxConsumers)Set the max number of consumer for specified topic asynchronously.voidsetMaxConsumersPerSubscription(java.lang.String topic, int maxConsumersPerSubscription)Set maxConsumersPerSubscription for a topic.java.util.concurrent.CompletableFuture<java.lang.Void>setMaxConsumersPerSubscriptionAsync(java.lang.String topic, int maxConsumersPerSubscription)Set maxConsumersPerSubscription for a topic asynchronously.voidsetMaxMessageSize(java.lang.String topic, int maxMessageSize)Set the max message size for specified topic.java.util.concurrent.CompletableFuture<java.lang.Void>setMaxMessageSizeAsync(java.lang.String topic, int maxMessageSize)Set the max message size for specified topic asynchronously.0 disables.voidsetMaxProducers(java.lang.String topic, int maxProducers)Set the max number of producer for specified topic.java.util.concurrent.CompletableFuture<java.lang.Void>setMaxProducersAsync(java.lang.String topic, int maxProducers)Set the max number of producer for specified topic asynchronously.voidsetMaxSubscriptionsPerTopic(java.lang.String topic, int maxSubscriptionsPerTopic)Set the max number of subscriptions for specified topic.java.util.concurrent.CompletableFuture<java.lang.Void>setMaxSubscriptionsPerTopicAsync(java.lang.String topic, int maxSubscriptionsPerTopic)Set the max number of subscriptions for specified topic asynchronously.voidsetMaxUnackedMessagesOnConsumer(java.lang.String topic, int maxNum)set max unacked messages on consumer of a topic.java.util.concurrent.CompletableFuture<java.lang.Void>setMaxUnackedMessagesOnConsumerAsync(java.lang.String topic, int maxNum)set max unacked messages on consumer of a topic asynchronously.voidsetMaxUnackedMessagesOnSubscription(java.lang.String topic, int maxNum)set max unacked messages on subscription of a topic.java.util.concurrent.CompletableFuture<java.lang.Void>setMaxUnackedMessagesOnSubscriptionAsync(java.lang.String topic, int maxNum)set max unacked messages on subscription of a topic asynchronously.voidsetMessageTTL(java.lang.String topic, int messageTTLInSecond)Set message TTL for a topic.voidsetOffloadPolicies(java.lang.String topic, OffloadPolicies offloadPolicies)set offload policies of a topic.java.util.concurrent.CompletableFuture<java.lang.Void>setOffloadPoliciesAsync(java.lang.String topic, OffloadPolicies offloadPolicies)set offload policies of a topic asynchronously.voidsetPersistence(java.lang.String topic, PersistencePolicies persistencePolicies)Set the configuration of persistence policies for specified topic.java.util.concurrent.CompletableFuture<java.lang.Void>setPersistenceAsync(java.lang.String topic, PersistencePolicies persistencePolicies)Set the configuration of persistence policies for specified topic asynchronously.voidsetPublishRate(java.lang.String topic, PublishRate publishMsgRate)Set message-publish-rate (topics can publish this many messages per second).java.util.concurrent.CompletableFuture<java.lang.Void>setPublishRateAsync(java.lang.String topic, PublishRate publishMsgRate)Set message-publish-rate (topics can publish this many messages per second) asynchronously.voidsetReplicatorDispatchRate(java.lang.String topic, DispatchRate dispatchRate)Set replicatorDispatchRate for the topic.java.util.concurrent.CompletableFuture<java.lang.Void>setReplicatorDispatchRateAsync(java.lang.String topic, DispatchRate dispatchRate)Set replicatorDispatchRate for the topic asynchronously.voidsetRetention(java.lang.String topic, RetentionPolicies retention)Set the retention configuration on a topic.java.util.concurrent.CompletableFuture<java.lang.Void>setRetentionAsync(java.lang.String topic, RetentionPolicies retention)Set the retention configuration for all the topics on a topic asynchronously.voidsetSubscribeRate(java.lang.String topic, SubscribeRate subscribeRate)Set topic-subscribe-rate (topic will limit by subscribeRate).java.util.concurrent.CompletableFuture<java.lang.Void>setSubscribeRateAsync(java.lang.String topic, SubscribeRate subscribeRate)Set topic-subscribe-rate (topics will limit by subscribeRate) asynchronously.voidsetSubscriptionDispatchRate(java.lang.String topic, DispatchRate dispatchRate)Set subscription-message-dispatch-rate for the topic.java.util.concurrent.CompletableFuture<java.lang.Void>setSubscriptionDispatchRateAsync(java.lang.String topic, DispatchRate dispatchRate)Set subscription-message-dispatch-rate for the topic asynchronously.voidsetSubscriptionTypesEnabled(java.lang.String topic, java.util.Set<org.apache.pulsar.client.api.SubscriptionType> subscriptionTypesEnabled)Set is enable sub types.java.util.concurrent.CompletableFuture<java.lang.Void>setSubscriptionTypesEnabledAsync(java.lang.String topic, java.util.Set<org.apache.pulsar.client.api.SubscriptionType> subscriptionTypesEnabled)Set is enable sub types asynchronously.voidskipAllMessages(java.lang.String topic, java.lang.String subName)Skip all messages on a topic subscription.java.util.concurrent.CompletableFuture<java.lang.Void>skipAllMessagesAsync(java.lang.String topic, java.lang.String subName)Skip all messages on a topic subscription asynchronously.voidskipMessages(java.lang.String topic, java.lang.String subName, long numMessages)Skip messages on a topic subscription.java.util.concurrent.CompletableFuture<java.lang.Void>skipMessagesAsync(java.lang.String topic, java.lang.String subName, long numMessages)Skip messages on a topic subscription asynchronously.org.apache.pulsar.client.api.MessageIdterminateTopic(java.lang.String topic)Terminate the topic and prevent any more messages being published on it.java.util.concurrent.CompletableFuture<org.apache.pulsar.client.api.MessageId>terminateTopicAsync(java.lang.String topic)Terminate the topic and prevent any more messages being published on it.voidtriggerCompaction(java.lang.String topic)Trigger compaction to run for a topic.java.util.concurrent.CompletableFuture<java.lang.Void>triggerCompactionAsync(java.lang.String topic)Trigger compaction to run for a topic asynchronously.voidtriggerOffload(java.lang.String topic, org.apache.pulsar.client.api.MessageId messageId)Trigger offloading messages in topic to longterm storage.java.util.concurrent.CompletableFuture<java.lang.Void>triggerOffloadAsync(java.lang.String topic, org.apache.pulsar.client.api.MessageId messageId)Trigger offloading messages in topic to longterm storage asynchronously.voidtruncate(java.lang.String topic)Truncate a topic.java.util.concurrent.CompletableFuture<java.lang.Void>truncateAsync(java.lang.String topic)Truncate a topic asynchronously.voidunload(java.lang.String topic)Unload a topic.java.util.concurrent.CompletableFuture<java.lang.Void>unloadAsync(java.lang.String topic)Unload a topic asynchronously.voidupdatePartitionedTopic(java.lang.String topic, int numPartitions)Update number of partitions of a non-global partitioned topic.voidupdatePartitionedTopic(java.lang.String topic, int numPartitions, boolean updateLocalTopicOnly)Update number of partitions of a non-global partitioned topic.java.util.concurrent.CompletableFuture<java.lang.Void>updatePartitionedTopicAsync(java.lang.String topic, int numPartitions)Update number of partitions of a non-global partitioned topic asynchronously.java.util.concurrent.CompletableFuture<java.lang.Void>updatePartitionedTopicAsync(java.lang.String topic, int numPartitions, boolean updateLocalTopicOnly)Update number of partitions of a non-global partitioned topic asynchronously.
-
-
-
Method Detail
-
getList
java.util.List<java.lang.String> getList(java.lang.String namespace) throws PulsarAdminExceptionGet the both persistent and non-persistent topics under a namespace. Response example:["topic://my-tenant/my-namespace/topic-1", "topic://my-tenant/my-namespace/topic-2"]- Parameters:
namespace- Namespace name- Returns:
- a list of topics
- Throws:
PulsarAdminException.NotAuthorizedException- Don't have admin permissionPulsarAdminException.NotFoundException- Namespace does not existPulsarAdminException- Unexpected error
-
getList
java.util.List<java.lang.String> getList(java.lang.String namespace, TopicDomain topicDomain) throws PulsarAdminExceptionGet the list of topics under a namespace. Response example:["topic://my-tenant/my-namespace/topic-1", "topic://my-tenant/my-namespace/topic-2"]- Parameters:
namespace- Namespace nametopicDomain- useTopicDomain.persistentto get persistent topics useTopicDomain.non_persistentto get non-persistent topics Use null to get both persistent and non-persistent topics- Returns:
- a list of topics
- Throws:
PulsarAdminException.NotAuthorizedException- Don't have admin permissionPulsarAdminException.NotFoundException- Namespace does not existPulsarAdminException- Unexpected error
-
getListAsync
java.util.concurrent.CompletableFuture<java.util.List<java.lang.String>> getListAsync(java.lang.String namespace)
Get both persistent and non-persistent topics under a namespace asynchronously. Response example:["topic://my-tenant/my-namespace/topic-1", "topic://my-tenant/my-namespace/topic-2"]- Parameters:
namespace- Namespace name- Returns:
- a list of topics
-
getListAsync
java.util.concurrent.CompletableFuture<java.util.List<java.lang.String>> getListAsync(java.lang.String namespace, TopicDomain topicDomain)Get the list of topics under a namespace asynchronously. Response example:["topic://my-tenant/my-namespace/topic-1", "topic://my-tenant/my-namespace/topic-2"]- Parameters:
namespace- Namespace nametopicDomain- useTopicDomain.persistentto get persistent topics useTopicDomain.non_persistentto get non-persistent topics Use null to get both persistent and non-persistent topics- Returns:
- a list of topics
-
getPartitionedTopicList
java.util.List<java.lang.String> getPartitionedTopicList(java.lang.String namespace) throws PulsarAdminExceptionGet the list of partitioned topics under a namespace. Response example:["persistent://my-tenant/my-namespace/topic-1", "persistent://my-tenant/my-namespace/topic-2"]- Parameters:
namespace- Namespace name- Returns:
- a list of partitioned topics
- Throws:
PulsarAdminException.NotAuthorizedException- Don't have admin permissionPulsarAdminException.NotFoundException- Namespace does not existPulsarAdminException- Unexpected error
-
getPartitionedTopicListAsync
java.util.concurrent.CompletableFuture<java.util.List<java.lang.String>> getPartitionedTopicListAsync(java.lang.String namespace)
Get the list of partitioned topics under a namespace asynchronously. Response example:["persistent://my-tenant/my-namespace/topic-1", "persistent://my-tenant/my-namespace/topic-2"]- Parameters:
namespace- Namespace name- Returns:
- a list of partitioned topics
-
getListInBundle
java.util.List<java.lang.String> getListInBundle(java.lang.String namespace, java.lang.String bundleRange) throws PulsarAdminExceptionGet list of topics exist into given bundle.- Parameters:
namespace-bundleRange-- Returns:
- Throws:
PulsarAdminException
-
getListInBundleAsync
java.util.concurrent.CompletableFuture<java.util.List<java.lang.String>> getListInBundleAsync(java.lang.String namespace, java.lang.String bundleRange)Get list of topics exist into given bundle asynchronously.- Parameters:
namespace-bundleRange-- Returns:
-
getPermissions
java.util.Map<java.lang.String,java.util.Set<AuthAction>> getPermissions(java.lang.String topic) throws PulsarAdminException
Get permissions on a topic. Retrieve the effective permissions for a topic. These permissions are defined by the permissions set at the namespace level combined (union) with any eventual specific permission set on the topic. Response Example:{ "role-1" : [ "produce" ], "role-2" : [ "consume" ] }- Parameters:
topic- Topic url- Returns:
- a map of topics an their permissions set
- Throws:
PulsarAdminException.NotAuthorizedException- Don't have admin permissionPulsarAdminException.NotFoundException- Namespace does not existPulsarAdminException- Unexpected error
-
getPermissionsAsync
java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.util.Set<AuthAction>>> getPermissionsAsync(java.lang.String topic)
Get permissions on a topic asynchronously. Retrieve the effective permissions for a topic. These permissions are defined by the permissions set at the namespace level combined (union) with any eventual specific permission set on the topic. Response Example:{ "role-1" : [ "produce" ], "role-2" : [ "consume" ] }- Parameters:
topic- Topic url- Returns:
- a map of topics an their permissions set
-
grantPermission
void grantPermission(java.lang.String topic, java.lang.String role, java.util.Set<AuthAction> actions) throws PulsarAdminExceptionGrant permission on a topic. Grant a new permission to a client role on a single topic. Request parameter example:["produce", "consume"]- Parameters:
topic- Topic urlrole- Client role to which grant permissionactions- Auth actions (produce and consume)- Throws:
PulsarAdminException.NotAuthorizedException- Don't have admin permissionPulsarAdminException.NotFoundException- Namespace does not existPulsarAdminException.ConflictException- Concurrent modificationPulsarAdminException- Unexpected error
-
grantPermissionAsync
java.util.concurrent.CompletableFuture<java.lang.Void> grantPermissionAsync(java.lang.String topic, java.lang.String role, java.util.Set<AuthAction> actions)Grant permission on a topic asynchronously. Grant a new permission to a client role on a single topic. Request parameter example:["produce", "consume"]- Parameters:
topic- Topic urlrole- Client role to which grant permissionactions- Auth actions (produce and consume)
-
revokePermissions
void revokePermissions(java.lang.String topic, java.lang.String role) throws PulsarAdminExceptionRevoke permissions on a topic. Revoke permissions to a client role on a single topic. If the permission was not set at the topic level, but rather at the namespace level, this operation will return an error (HTTP status code 412).- Parameters:
topic- Topic urlrole- Client role to which remove permission- Throws:
PulsarAdminException.NotAuthorizedException- Don't have admin permissionPulsarAdminException.NotFoundException- Namespace does not existPulsarAdminException.PreconditionFailedException- Permissions are not set at the topic levelPulsarAdminException- Unexpected error
-
revokePermissionsAsync
java.util.concurrent.CompletableFuture<java.lang.Void> revokePermissionsAsync(java.lang.String topic, java.lang.String role)Revoke permissions on a topic asynchronously. Revoke permissions to a client role on a single topic. If the permission was not set at the topic level, but rather at the namespace level, this operation will return an error (HTTP status code 412).- Parameters:
topic- Topic urlrole- Client role to which remove permission
-
createPartitionedTopic
void createPartitionedTopic(java.lang.String topic, int numPartitions) throws PulsarAdminExceptionCreate a partitioned topic. Create a partitioned topic. It needs to be called before creating a producer for a partitioned topic.- Parameters:
topic- Topic namenumPartitions- Number of partitions to create of the topic- Throws:
PulsarAdminException
-
createPartitionedTopicAsync
java.util.concurrent.CompletableFuture<java.lang.Void> createPartitionedTopicAsync(java.lang.String topic, int numPartitions)Create a partitioned topic asynchronously. Create a partitioned topic asynchronously. It needs to be called before creating a producer for a partitioned topic.- Parameters:
topic- Topic namenumPartitions- Number of partitions to create of the topic- Returns:
- a future that can be used to track when the partitioned topic is created
-
createNonPartitionedTopic
void createNonPartitionedTopic(java.lang.String topic) throws PulsarAdminExceptionCreate a non-partitioned topic. Create a non-partitioned topic.- Parameters:
topic- Topic name- Throws:
PulsarAdminException
-
createNonPartitionedTopicAsync
java.util.concurrent.CompletableFuture<java.lang.Void> createNonPartitionedTopicAsync(java.lang.String topic)
Create a non-partitioned topic asynchronously.- Parameters:
topic- Topic name
-
createMissedPartitions
void createMissedPartitions(java.lang.String topic) throws PulsarAdminExceptionCreate missed partitions for partitioned topic. When disable topic auto creation, use this method to try create missed partitions while partitions create failed or users already have partitioned topic without partitions.- Parameters:
topic- partitioned topic name- Throws:
PulsarAdminException
-
createMissedPartitionsAsync
java.util.concurrent.CompletableFuture<java.lang.Void> createMissedPartitionsAsync(java.lang.String topic)
Create missed partitions for partitioned topic asynchronously. When disable topic auto creation, use this method to try create missed partitions while partitions create failed or users already have partitioned topic without partitions.- Parameters:
topic- partitioned topic name
-
updatePartitionedTopic
void updatePartitionedTopic(java.lang.String topic, int numPartitions) throws PulsarAdminExceptionUpdate number of partitions of a non-global partitioned topic. It requires partitioned-topic to be already exist and number of new partitions must be greater than existing number of partitions. Decrementing number of partitions requires deletion of topic which is not supported.- Parameters:
topic- Topic namenumPartitions- Number of new partitions of already exist partitioned-topic- Throws:
PulsarAdminException
-
updatePartitionedTopicAsync
java.util.concurrent.CompletableFuture<java.lang.Void> updatePartitionedTopicAsync(java.lang.String topic, int numPartitions)Update number of partitions of a non-global partitioned topic asynchronously. It requires partitioned-topic to be already exist and number of new partitions must be greater than existing number of partitions. Decrementing number of partitions requires deletion of topic which is not supported.- Parameters:
topic- Topic namenumPartitions- Number of new partitions of already exist partitioned-topic- Returns:
- a future that can be used to track when the partitioned topic is updated
-
updatePartitionedTopic
void updatePartitionedTopic(java.lang.String topic, int numPartitions, boolean updateLocalTopicOnly) throws PulsarAdminExceptionUpdate number of partitions of a non-global partitioned topic. It requires partitioned-topic to be already exist and number of new partitions must be greater than existing number of partitions. Decrementing number of partitions requires deletion of topic which is not supported.- Parameters:
topic- Topic namenumPartitions- Number of new partitions of already exist partitioned-topicupdateLocalTopicOnly- Used by broker for global topic with multiple replicated clusters- Throws:
PulsarAdminException
-
updatePartitionedTopicAsync
java.util.concurrent.CompletableFuture<java.lang.Void> updatePartitionedTopicAsync(java.lang.String topic, int numPartitions, boolean updateLocalTopicOnly)Update number of partitions of a non-global partitioned topic asynchronously. It requires partitioned-topic to be already exist and number of new partitions must be greater than existing number of partitions. Decrementing number of partitions requires deletion of topic which is not supported.- Parameters:
topic- Topic namenumPartitions- Number of new partitions of already exist partitioned-topicupdateLocalTopicOnly- Used by broker for global topic with multiple replicated clusters- Returns:
- a future that can be used to track when the partitioned topic is updated
-
getPartitionedTopicMetadata
PartitionedTopicMetadata getPartitionedTopicMetadata(java.lang.String topic) throws PulsarAdminException
Get metadata of a partitioned topic. Get metadata of a partitioned topic.- Parameters:
topic- Topic name- Returns:
- Partitioned topic metadata
- Throws:
PulsarAdminException
-
getPartitionedTopicMetadataAsync
java.util.concurrent.CompletableFuture<PartitionedTopicMetadata> getPartitionedTopicMetadataAsync(java.lang.String topic)
Get metadata of a partitioned topic asynchronously. Get metadata of a partitioned topic asynchronously.- Parameters:
topic- Topic name- Returns:
- a future that can be used to track when the partitioned topic metadata is returned
-
deletePartitionedTopic
void deletePartitionedTopic(java.lang.String topic, boolean force, boolean deleteSchema) throws PulsarAdminExceptionDelete a partitioned topic. It will also delete all the partitions of the topic if it exists.- Parameters:
topic- Topic nameforce- Delete topic forcefullydeleteSchema- Delete topic's schema storage- Throws:
PulsarAdminException
-
deletePartitionedTopic
default void deletePartitionedTopic(java.lang.String topic, boolean force) throws PulsarAdminException- Throws:
PulsarAdminException- See Also:
deletePartitionedTopic(String, boolean, boolean)
-
deletePartitionedTopicAsync
java.util.concurrent.CompletableFuture<java.lang.Void> deletePartitionedTopicAsync(java.lang.String topic, boolean force, boolean deleteSchema)Delete a partitioned topic asynchronously. It will also delete all the partitions of the topic if it exists.- Parameters:
topic- Topic nameforce- Delete topic forcefullydeleteSchema- Delete topic's schema storage- Returns:
- a future that can be used to track when the partitioned topic is deleted
-
deletePartitionedTopicAsync
default java.util.concurrent.CompletableFuture<java.lang.Void> deletePartitionedTopicAsync(java.lang.String topic, boolean force)
-
deletePartitionedTopic
void deletePartitionedTopic(java.lang.String topic) throws PulsarAdminExceptionDelete a partitioned topic. It will also delete all the partitions of the topic if it exists.- Parameters:
topic- Topic name- Throws:
PulsarAdminException
-
deletePartitionedTopicAsync
java.util.concurrent.CompletableFuture<java.lang.Void> deletePartitionedTopicAsync(java.lang.String topic)
Delete a partitioned topic asynchronously. It will also delete all the partitions of the topic if it exists.- Parameters:
topic- Topic name
-
delete
void delete(java.lang.String topic, boolean force, boolean deleteSchema) throws PulsarAdminExceptionDelete a topic. Delete a topic. The topic cannot be deleted if force flag is disable and there's any active subscription or producer connected to the it. Force flag deletes topic forcefully by closing all active producers and consumers.- Parameters:
topic- Topic nameforce- Delete topic forcefullydeleteSchema- Delete topic's schema storage- Throws:
PulsarAdminException.NotAuthorizedException- Don't have admin permissionPulsarAdminException.NotFoundException- Topic does not existPulsarAdminException.PreconditionFailedException- Topic has active subscriptions or producersPulsarAdminException- Unexpected error
-
delete
default void delete(java.lang.String topic, boolean force) throws PulsarAdminException- Throws:
PulsarAdminException- See Also:
delete(String, boolean, boolean)
-
deleteAsync
java.util.concurrent.CompletableFuture<java.lang.Void> deleteAsync(java.lang.String topic, boolean force, boolean deleteSchema)Delete a topic asynchronously. Delete a topic asynchronously. The topic cannot be deleted if force flag is disable and there's any active subscription or producer connected to the it. Force flag deletes topic forcefully by closing all active producers and consumers.- Parameters:
topic- topic nameforce- Delete topic forcefullydeleteSchema- Delete topic's schema storage- Returns:
- a future that can be used to track when the topic is deleted
-
deleteAsync
default java.util.concurrent.CompletableFuture<java.lang.Void> deleteAsync(java.lang.String topic, boolean force)- See Also:
deleteAsync(String, boolean, boolean)
-
delete
void delete(java.lang.String topic) throws PulsarAdminExceptionDelete a topic. Delete a topic. The topic cannot be deleted if there's any active subscription or producer connected to the it.- Parameters:
topic- Topic name- Throws:
PulsarAdminException.NotAuthorizedException- Don't have admin permissionPulsarAdminException.NotFoundException- Topic does not existPulsarAdminException.PreconditionFailedException- Topic has active subscriptions or producersPulsarAdminException- Unexpected error
-
deleteAsync
java.util.concurrent.CompletableFuture<java.lang.Void> deleteAsync(java.lang.String topic)
Delete a topic asynchronously. Delete a topic. The topic cannot be deleted if there's any active subscription or producer connected to the it.- Parameters:
topic- Topic name
-
unload
void unload(java.lang.String topic) throws PulsarAdminExceptionUnload a topic.- Parameters:
topic- topic name- Throws:
PulsarAdminException.NotAuthorizedException- Don't have admin permissionPulsarAdminException.NotFoundException- topic does not existPulsarAdminException- Unexpected error
-
unloadAsync
java.util.concurrent.CompletableFuture<java.lang.Void> unloadAsync(java.lang.String topic)
Unload a topic asynchronously.- Parameters:
topic- topic name- Returns:
- a future that can be used to track when the topic is unloaded
-
terminateTopic
org.apache.pulsar.client.api.MessageId terminateTopic(java.lang.String topic) throws PulsarAdminExceptionTerminate the topic and prevent any more messages being published on it.- Parameters:
topic- topic name- Returns:
- the message id of the last message that was published in the topic
- Throws:
PulsarAdminException.NotAuthorizedException- Don't have admin permissionPulsarAdminException.NotFoundException- topic does not existPulsarAdminException- Unexpected error
-
terminateTopicAsync
java.util.concurrent.CompletableFuture<org.apache.pulsar.client.api.MessageId> terminateTopicAsync(java.lang.String topic)
Terminate the topic and prevent any more messages being published on it.- Parameters:
topic- topic name- Returns:
- the message id of the last message that was published in the topic
-
getSubscriptions
java.util.List<java.lang.String> getSubscriptions(java.lang.String topic) throws PulsarAdminExceptionGet the list of subscriptions. Get the list of persistent subscriptions for a given topic.- Parameters:
topic- topic name- Returns:
- the list of subscriptions
- Throws:
PulsarAdminException.NotAuthorizedException- Don't have admin permissionPulsarAdminException.NotFoundException- Topic does not existPulsarAdminException- Unexpected error
-
getSubscriptionsAsync
java.util.concurrent.CompletableFuture<java.util.List<java.lang.String>> getSubscriptionsAsync(java.lang.String topic)
Get the list of subscriptions asynchronously. Get the list of persistent subscriptions for a given topic.- Parameters:
topic- topic name- Returns:
- a future that can be used to track when the list of subscriptions is returned
-
getStats
TopicStats getStats(java.lang.String topic, boolean getPreciseBacklog, boolean subscriptionBacklogSize) throws PulsarAdminException
Get the stats for the topic. Response Example:{ "msgRateIn" : 100.0, // Total rate of messages published on the topic. msg/s "msgThroughputIn" : 10240.0, // Total throughput of messages published on the topic. byte/s "msgRateOut" : 100.0, // Total rate of messages delivered on the topic. msg/s "msgThroughputOut" : 10240.0, // Total throughput of messages delivered on the topic. byte/s "averageMsgSize" : 1024.0, // Average size of published messages. bytes "publishers" : [ // List of publishes on this topic with their stats { "producerId" : 10 // producer id "address" : 10.4.1.23:3425 // IP and port for this producer "connectedSince" : 2014-11-21 23:54:46 // Timestamp of this published connection "msgRateIn" : 100.0, // Total rate of messages published by this producer. msg/s "msgThroughputIn" : 10240.0, // Total throughput of messages published by this producer. byte/s "averageMsgSize" : 1024.0, // Average size of published messages by this producer. bytes }, ], "subscriptions" : { // Map of subscriptions on this topic "sub1" : { "msgRateOut" : 100.0, // Total rate of messages delivered on this subscription. msg/s "msgThroughputOut" : 10240.0, // Total throughput delivered on this subscription. bytes/s "msgBacklog" : 0, // Number of messages in the subscriotion backlog "type" : Exclusive // Whether the subscription is exclusive or shared "consumers" [ // List of consumers on this subscription { "id" : 5 // Consumer id "address" : 10.4.1.23:3425 // IP and port for this consumer "connectedSince" : 2014-11-21 23:54:46 // Timestamp of this consumer connection "msgRateOut" : 100.0, // Total rate of messages delivered to this consumer. msg/s "msgThroughputOut" : 10240.0, // Total throughput delivered to this consumer. bytes/s } ], }, "replication" : { // Replication statistics "cluster_1" : { // Cluster name in the context of from-cluster or to-cluster "msgRateIn" : 100.0, // Total rate of messages received from this remote cluster. msg/s "msgThroughputIn" : 10240.0, // Total throughput received from this remote cluster. bytes/s "msgRateOut" : 100.0, // Total rate of messages delivered to the replication-subscriber. msg/s "msgThroughputOut" : 10240.0, // Total throughput delivered to the replication-subscriber. bytes/s "replicationBacklog" : 0, // Number of messages pending to be replicated to this remote cluster "connected" : true, // Whether the replication-subscriber is currently connected locally }, "cluster_2" : { "msgRateIn" : 100.0, "msgThroughputIn" : 10240.0, "msgRateOut" : 100.0, "msgThroughputOut" : 10240.0, "replicationBacklog" : 0, "connected" : true, } }, }All the rates are computed over a 1 minute window and are relative the last completed 1 minute period.
- Parameters:
topic- topic namegetPreciseBacklog- Set to true to get precise backlog, Otherwise get imprecise backlog.subscriptionBacklogSize- Whether to get backlog size for each subscription.- Returns:
- the topic statistics
- Throws:
PulsarAdminException.NotAuthorizedException- Don't have admin permissionPulsarAdminException.NotFoundException- Topic does not existPulsarAdminException- Unexpected error
-
getStats
default TopicStats getStats(java.lang.String topic, boolean getPreciseBacklog) throws PulsarAdminException
- Throws:
PulsarAdminException
-
getStats
default TopicStats getStats(java.lang.String topic) throws PulsarAdminException
- Throws:
PulsarAdminException
-
getStatsAsync
java.util.concurrent.CompletableFuture<TopicStats> getStatsAsync(java.lang.String topic, boolean getPreciseBacklog, boolean subscriptionBacklogSize)
Get the stats for the topic asynchronously. All the rates are computed over a 1 minute window and are relative the last completed 1 minute period.- Parameters:
topic- topic namegetPreciseBacklog- Set to true to get precise backlog, Otherwise get imprecise backlog.subscriptionBacklogSize- Whether to get backlog size for each subscription.- Returns:
- a future that can be used to track when the topic statistics are returned
-
getStatsAsync
default java.util.concurrent.CompletableFuture<TopicStats> getStatsAsync(java.lang.String topic)
-
getInternalStats
PersistentTopicInternalStats getInternalStats(java.lang.String topic, boolean metadata) throws PulsarAdminException
Get the internal stats for the topic. Access the internal state of the topic- Parameters:
topic- topic namemetadata- flag to include ledger metadata- Returns:
- the topic statistics
- Throws:
PulsarAdminException.NotAuthorizedException- Don't have admin permissionPulsarAdminException.NotFoundException- Topic does not existPulsarAdminException- Unexpected error
-
getInternalStats
PersistentTopicInternalStats getInternalStats(java.lang.String topic) throws PulsarAdminException
Get the internal stats for the topic. Access the internal state of the topic- Parameters:
topic- topic name- Returns:
- the topic statistics
- Throws:
PulsarAdminException.NotAuthorizedException- Don't have admin permissionPulsarAdminException.NotFoundException- Topic does not existPulsarAdminException- Unexpected error
-
getInternalStatsAsync
java.util.concurrent.CompletableFuture<PersistentTopicInternalStats> getInternalStatsAsync(java.lang.String topic, boolean metadata)
Get the internal stats for the topic asynchronously.- Parameters:
topic- topic Namemetadata- flag to include ledger metadata- Returns:
- a future that can be used to track when the internal topic statistics are returned
-
getInternalStatsAsync
java.util.concurrent.CompletableFuture<PersistentTopicInternalStats> getInternalStatsAsync(java.lang.String topic)
Get the internal stats for the topic asynchronously.- Parameters:
topic- topic Name- Returns:
- a future that can be used to track when the internal topic statistics are returned
-
getInternalInfo
java.lang.String getInternalInfo(java.lang.String topic) throws PulsarAdminExceptionGet a JSON representation of the topic metadata stored in ZooKeeper.- Parameters:
topic- topic name- Returns:
- the topic internal metadata
- Throws:
PulsarAdminException.NotAuthorizedException- Don't have admin permissionPulsarAdminException.NotFoundException- Topic does not existPulsarAdminException- Unexpected error
-
getInternalInfoAsync
java.util.concurrent.CompletableFuture<java.lang.String> getInternalInfoAsync(java.lang.String topic)
Get a JSON representation of the topic metadata stored in ZooKeeper.- Parameters:
topic- topic name- Returns:
- a future to receive the topic internal metadata
- Throws:
PulsarAdminException.NotAuthorizedException- Don't have admin permissionPulsarAdminException.NotFoundException- Topic does not existPulsarAdminException- Unexpected error
-
getPartitionedStats
PartitionedTopicStats getPartitionedStats(java.lang.String topic, boolean perPartition, boolean getPreciseBacklog, boolean subscriptionBacklogSize) throws PulsarAdminException
Get the stats for the partitioned topic Response Example:{ "msgRateIn" : 100.0, // Total rate of messages published on the partitioned topic. msg/s "msgThroughputIn" : 10240.0, // Total throughput of messages published on the partitioned topic. byte/s "msgRateOut" : 100.0, // Total rate of messages delivered on the partitioned topic. msg/s "msgThroughputOut" : 10240.0, // Total throughput of messages delivered on the partitioned topic. byte/s "averageMsgSize" : 1024.0, // Average size of published messages. bytes "publishers" : [ // List of publishes on this partitioned topic with their stats { "msgRateIn" : 100.0, // Total rate of messages published by this producer. msg/s "msgThroughputIn" : 10240.0, // Total throughput of messages published by this producer. byte/s "averageMsgSize" : 1024.0, // Average size of published messages by this producer. bytes }, ], "subscriptions" : { // Map of subscriptions on this topic "sub1" : { "msgRateOut" : 100.0, // Total rate of messages delivered on this subscription. msg/s "msgThroughputOut" : 10240.0, // Total throughput delivered on this subscription. bytes/s "msgBacklog" : 0, // Number of messages in the subscriotion backlog "type" : Exclusive // Whether the subscription is exclusive or shared "consumers" [ // List of consumers on this subscription { "msgRateOut" : 100.0, // Total rate of messages delivered to this consumer. msg/s "msgThroughputOut" : 10240.0, // Total throughput delivered to this consumer. bytes/s } ], }, "replication" : { // Replication statistics "cluster_1" : { // Cluster name in the context of from-cluster or to-cluster "msgRateIn" : 100.0, // Total rate of messages received from this remote cluster. msg/s "msgThroughputIn" : 10240.0, // Total throughput received from this remote cluster. bytes/s "msgRateOut" : 100.0, // Total rate of messages delivered to the replication-subscriber. msg/s "msgThroughputOut" : 10240.0, // Total throughput delivered to the replication-subscriber. bytes/s "replicationBacklog" : 0, // Number of messages pending to be replicated to this remote cluster "connected" : true, // Whether the replication-subscriber is currently connected locally }, "cluster_2" : { "msgRateIn" : 100.0, "msgThroughputIn" : 10240.0, "msgRateOut" : 100.0, "msghroughputOut" : 10240.0, "replicationBacklog" : 0, "connected" : true, } }, }All the rates are computed over a 1 minute window and are relative the last completed 1 minute period.
- Parameters:
topic- topic nameperPartition- flag to get stats per partitiongetPreciseBacklog- Set to true to get precise backlog, Otherwise get imprecise backlog.subscriptionBacklogSize- Whether to get backlog size for each subscription.- Returns:
- the partitioned topic statistics
- Throws:
PulsarAdminException.NotAuthorizedException- Don't have admin permissionPulsarAdminException.NotFoundException- Topic does not existPulsarAdminException- Unexpected error
-
getPartitionedStats
default PartitionedTopicStats getPartitionedStats(java.lang.String topic, boolean perPartition) throws PulsarAdminException
- Throws:
PulsarAdminException
-
getPartitionedStatsAsync
java.util.concurrent.CompletableFuture<PartitionedTopicStats> getPartitionedStatsAsync(java.lang.String topic, boolean perPartition, boolean getPreciseBacklog, boolean subscriptionBacklogSize)
Get the stats for the partitioned topic asynchronously.- Parameters:
topic- topic NameperPartition- flag to get stats per partitiongetPreciseBacklog- Set to true to get precise backlog, Otherwise get imprecise backlog.subscriptionBacklogSize- Whether to get backlog size for each subscription.- Returns:
- a future that can be used to track when the partitioned topic statistics are returned
-
getPartitionedStatsAsync
default java.util.concurrent.CompletableFuture<PartitionedTopicStats> getPartitionedStatsAsync(java.lang.String topic, boolean perPartition)
-
getPartitionedInternalStats
PartitionedTopicInternalStats getPartitionedInternalStats(java.lang.String topic) throws PulsarAdminException
Get the stats for the partitioned topic.- Parameters:
topic- topic name- Returns:
- Throws:
PulsarAdminException
-
getPartitionedInternalStatsAsync
java.util.concurrent.CompletableFuture<PartitionedTopicInternalStats> getPartitionedInternalStatsAsync(java.lang.String topic)
Get the stats-internal for the partitioned topic asynchronously.- Parameters:
topic- topic Name- Returns:
- a future that can be used to track when the partitioned topic statistics are returned
-
deleteSubscription
void deleteSubscription(java.lang.String topic, java.lang.String subName) throws PulsarAdminExceptionDelete a subscription. Delete a persistent subscription from a topic. There should not be any active consumers on the subscription.- Parameters:
topic- topic namesubName- Subscription name- Throws:
PulsarAdminException.NotAuthorizedException- Don't have admin permissionPulsarAdminException.NotFoundException- Topic or subscription does not existPulsarAdminException.PreconditionFailedException- Subscription has active consumersPulsarAdminException- Unexpected error
-
deleteSubscription
void deleteSubscription(java.lang.String topic, java.lang.String subName, boolean force) throws PulsarAdminExceptionDelete a subscription. Delete a persistent subscription from a topic. There should not be any active consumers on the subscription. Force flag deletes subscription forcefully by closing all active consumers.- Parameters:
topic- topic namesubName- Subscription nameforce- Delete topic forcefully- Throws:
PulsarAdminException.NotAuthorizedException- Don't have admin permissionPulsarAdminException.NotFoundException- Topic or subscription does not existPulsarAdminException.PreconditionFailedException- Subscription has active consumersPulsarAdminException- Unexpected error
-
deleteSubscriptionAsync
java.util.concurrent.CompletableFuture<java.lang.Void> deleteSubscriptionAsync(java.lang.String topic, java.lang.String subName)Delete a subscription asynchronously. Delete a persistent subscription from a topic. There should not be any active consumers on the subscription.- Parameters:
topic- topic namesubName- Subscription name- Returns:
- a future that can be used to track when the subscription is deleted
-
deleteSubscriptionAsync
java.util.concurrent.CompletableFuture<java.lang.Void> deleteSubscriptionAsync(java.lang.String topic, java.lang.String subName, boolean force)Delete a subscription asynchronously. Delete a persistent subscription from a topic. There should not be any active consumers on the subscription. Force flag deletes subscription forcefully by closing all active consumers.- Parameters:
topic- topic namesubName- Subscription nameforce- Delete topic forcefully- Returns:
- a future that can be used to track when the subscription is deleted
-
skipAllMessages
void skipAllMessages(java.lang.String topic, java.lang.String subName) throws PulsarAdminExceptionSkip all messages on a topic subscription. Completely clears the backlog on the subscription.- Parameters:
topic- topic namesubName- Subscription name- Throws:
PulsarAdminException.NotAuthorizedException- Don't have admin permissionPulsarAdminException.NotFoundException- Topic or subscription does not existPulsarAdminException- Unexpected error
-
skipAllMessagesAsync
java.util.concurrent.CompletableFuture<java.lang.Void> skipAllMessagesAsync(java.lang.String topic, java.lang.String subName)Skip all messages on a topic subscription asynchronously. Completely clears the backlog on the subscription.- Parameters:
topic- topic namesubName- Subscription name- Returns:
- a future that can be used to track when all the messages are skipped
-
skipMessages
void skipMessages(java.lang.String topic, java.lang.String subName, long numMessages) throws PulsarAdminExceptionSkip messages on a topic subscription.- Parameters:
topic- topic namesubName- Subscription namenumMessages- Number of messages- Throws:
PulsarAdminException.NotAuthorizedException- Don't have admin permissionPulsarAdminException.NotFoundException- Topic or subscription does not existPulsarAdminException- Unexpected error
-
skipMessagesAsync
java.util.concurrent.CompletableFuture<java.lang.Void> skipMessagesAsync(java.lang.String topic, java.lang.String subName, long numMessages)Skip messages on a topic subscription asynchronously.- Parameters:
topic- topic namesubName- Subscription namenumMessages- Number of messages- Returns:
- a future that can be used to track when the number of messages are skipped
-
expireMessages
void expireMessages(java.lang.String topic, java.lang.String subscriptionName, long expireTimeInSeconds) throws PulsarAdminExceptionExpire all messages older than given N (expireTimeInSeconds) seconds for a given subscription.- Parameters:
topic- topic namesubscriptionName- Subscription nameexpireTimeInSeconds- Expire messages older than time in seconds- Throws:
PulsarAdminException- Unexpected error
-
expireMessagesAsync
java.util.concurrent.CompletableFuture<java.lang.Void> expireMessagesAsync(java.lang.String topic, java.lang.String subscriptionName, long expireTimeInSeconds)Expire all messages older than given N (expireTimeInSeconds) seconds for a given subscription asynchronously.- Parameters:
topic- topic namesubscriptionName- Subscription nameexpireTimeInSeconds- Expire messages older than time in seconds- Returns:
-
expireMessages
void expireMessages(java.lang.String topic, java.lang.String subscriptionName, org.apache.pulsar.client.api.MessageId messageId, boolean isExcluded) throws PulsarAdminExceptionExpire all messages older than given N (expireTimeInSeconds) seconds for a given subscription.- Parameters:
topic- topic namesubscriptionName- Subscription namemessageId- Position before which all messages will be expired.isExcluded- Will message at passed in position also be expired.- Throws:
PulsarAdminException- Unexpected error
-
expireMessagesAsync
java.util.concurrent.CompletableFuture<java.lang.Void> expireMessagesAsync(java.lang.String topic, java.lang.String subscriptionName, org.apache.pulsar.client.api.MessageId messageId, boolean isExcluded)Expire all messages older than given N (expireTimeInSeconds) seconds for a given subscription asynchronously.- Parameters:
topic- topic namesubscriptionName- Subscription namemessageId- Position before which all messages will be expired.isExcluded- Will message at passed in position also be expired.- Returns:
- A
CompletableFuturethat'll be completed when expire message is done.
-
expireMessagesForAllSubscriptions
void expireMessagesForAllSubscriptions(java.lang.String topic, long expireTimeInSeconds) throws PulsarAdminExceptionExpire all messages older than given N seconds for all subscriptions of the persistent-topic.- Parameters:
topic- topic nameexpireTimeInSeconds- Expire messages older than time in seconds- Throws:
PulsarAdminException- Unexpected error
-
expireMessagesForAllSubscriptionsAsync
java.util.concurrent.CompletableFuture<java.lang.Void> expireMessagesForAllSubscriptionsAsync(java.lang.String topic, long expireTimeInSeconds)Expire all messages older than given N seconds for all subscriptions of the persistent-topic asynchronously.- Parameters:
topic- topic nameexpireTimeInSeconds- Expire messages older than time in seconds
-
peekMessages
java.util.List<org.apache.pulsar.client.api.Message<byte[]>> peekMessages(java.lang.String topic, java.lang.String subName, int numMessages) throws PulsarAdminExceptionPeek messages from a topic subscription.- Parameters:
topic- topic namesubName- Subscription namenumMessages- Number of messages- Returns:
- Throws:
PulsarAdminException.NotAuthorizedException- Don't have admin permissionPulsarAdminException.NotFoundException- Topic or subscription does not existPulsarAdminException- Unexpected error
-
peekMessagesAsync
java.util.concurrent.CompletableFuture<java.util.List<org.apache.pulsar.client.api.Message<byte[]>>> peekMessagesAsync(java.lang.String topic, java.lang.String subName, int numMessages)Peek messages from a topic subscription asynchronously.- Parameters:
topic- topic namesubName- Subscription namenumMessages- Number of messages- Returns:
- a future that can be used to track when the messages are returned
-
getMessageById
org.apache.pulsar.client.api.Message<byte[]> getMessageById(java.lang.String topic, long ledgerId, long entryId) throws PulsarAdminExceptionGet a message by its messageId via a topic subscription.- Parameters:
topic- Topic nameledgerId- Ledger identryId- Entry id- Returns:
- the message indexed by the messageId
- Throws:
PulsarAdminException- Unexpected error
-
getMessageByIdAsync
java.util.concurrent.CompletableFuture<org.apache.pulsar.client.api.Message<byte[]>> getMessageByIdAsync(java.lang.String topic, long ledgerId, long entryId)Get a message by its messageId via a topic subscription asynchronously.- Parameters:
topic- Topic nameledgerId- Ledger identryId- Entry id- Returns:
- a future that can be used to track when the message is returned
-
createSubscription
void createSubscription(java.lang.String topic, java.lang.String subscriptionName, org.apache.pulsar.client.api.MessageId messageId) throws PulsarAdminExceptionCreate a new subscription on a topic.- Parameters:
topic- topic namesubscriptionName- Subscription namemessageId- TheMessageIdon where to initialize the subscription. It could beMessageId.latest,MessageId.earliestor a specific message id.- Throws:
PulsarAdminException.NotAuthorizedException- Don't have admin permissionPulsarAdminException.ConflictException- Subscription already existsPulsarAdminException.NotAllowedException- Command disallowed for requested resourcePulsarAdminException- Unexpected error
-
createSubscriptionAsync
java.util.concurrent.CompletableFuture<java.lang.Void> createSubscriptionAsync(java.lang.String topic, java.lang.String subscriptionName, org.apache.pulsar.client.api.MessageId messageId)Create a new subscription on a topic.- Parameters:
topic- topic namesubscriptionName- Subscription namemessageId- TheMessageIdon where to initialize the subscription. It could beMessageId.latest,MessageId.earliestor a specific message id.
-
resetCursor
void resetCursor(java.lang.String topic, java.lang.String subName, long timestamp) throws PulsarAdminExceptionReset cursor position on a topic subscription.- Parameters:
topic- topic namesubName- Subscription nametimestamp- reset subscription to position closest to time in ms since epoch- Throws:
PulsarAdminException.NotAuthorizedException- Don't have admin permissionPulsarAdminException.NotFoundException- Topic or subscription does not existPulsarAdminException.NotAllowedException- Command disallowed for requested resourcePulsarAdminException- Unexpected error
-
resetCursor
void resetCursor(java.lang.String topic, java.lang.String subName, org.apache.pulsar.client.api.MessageId messageId, boolean isExcluded) throws PulsarAdminExceptionReset cursor position on a topic subscription. and start consume messages from the next position of the reset position.- Parameters:
topic-subName-messageId-isExcluded-- Throws:
PulsarAdminException
-
resetCursorAsync
java.util.concurrent.CompletableFuture<java.lang.Void> resetCursorAsync(java.lang.String topic, java.lang.String subName, long timestamp)Reset cursor position on a topic subscription.- Parameters:
topic- topic namesubName- Subscription nametimestamp- reset subscription to position closest to time in ms since epoch
-
resetCursorAsync
java.util.concurrent.CompletableFuture<java.lang.Void> resetCursorAsync(java.lang.String topic, java.lang.String subName, org.apache.pulsar.client.api.MessageId messageId, boolean isExcluded)Reset cursor position on a topic subscription. and start consume messages from the next position of the reset position.- Parameters:
topic-subName-messageId-isExcluded-- Returns:
-
resetCursor
void resetCursor(java.lang.String topic, java.lang.String subName, org.apache.pulsar.client.api.MessageId messageId) throws PulsarAdminExceptionReset cursor position on a topic subscription.- Parameters:
topic- topic namesubName- Subscription namemessageId- reset subscription to messageId (or previous nearest messageId if given messageId is not valid)- Throws:
PulsarAdminException.NotAuthorizedException- Don't have admin permissionPulsarAdminException.NotFoundException- Topic or subscription does not existPulsarAdminException.NotAllowedException- Command disallowed for requested resourcePulsarAdminException- Unexpected error
-
resetCursorAsync
java.util.concurrent.CompletableFuture<java.lang.Void> resetCursorAsync(java.lang.String topic, java.lang.String subName, org.apache.pulsar.client.api.MessageId messageId)Reset cursor position on a topic subscription.- Parameters:
topic- topic namesubName- Subscription namemessageId- reset subscription to messageId (or previous nearest messageId if given messageId is not valid)
-
triggerCompaction
void triggerCompaction(java.lang.String topic) throws PulsarAdminExceptionTrigger compaction to run for a topic. A single topic can only have one instance of compaction running at any time. Any attempt to trigger another will be met with a ConflictException.- Parameters:
topic- The topic on which to trigger compaction- Throws:
PulsarAdminException
-
triggerCompactionAsync
java.util.concurrent.CompletableFuture<java.lang.Void> triggerCompactionAsync(java.lang.String topic)
Trigger compaction to run for a topic asynchronously.- Parameters:
topic- The topic on which to trigger compaction
-
compactionStatus
LongRunningProcessStatus compactionStatus(java.lang.String topic) throws PulsarAdminException
Check the status of an ongoing compaction for a topic.- Parameters:
topic- The topic whose compaction status we wish to check- Throws:
PulsarAdminException
-
compactionStatusAsync
java.util.concurrent.CompletableFuture<LongRunningProcessStatus> compactionStatusAsync(java.lang.String topic)
Check the status of an ongoing compaction for a topic asynchronously.- Parameters:
topic- The topic whose compaction status we wish to check
-
triggerOffload
void triggerOffload(java.lang.String topic, org.apache.pulsar.client.api.MessageId messageId) throws PulsarAdminExceptionTrigger offloading messages in topic to longterm storage.- Parameters:
topic- the topic to offloadmessageId- ID of maximum message which should be offloaded- Throws:
PulsarAdminException
-
triggerOffloadAsync
java.util.concurrent.CompletableFuture<java.lang.Void> triggerOffloadAsync(java.lang.String topic, org.apache.pulsar.client.api.MessageId messageId)Trigger offloading messages in topic to longterm storage asynchronously.- Parameters:
topic- the topic to offloadmessageId- ID of maximum message which should be offloaded
-
offloadStatus
OffloadProcessStatus offloadStatus(java.lang.String topic) throws PulsarAdminException
Check the status of an ongoing offloading operation for a topic.- Parameters:
topic- the topic being offloaded- Returns:
- the status of the offload operation
- Throws:
PulsarAdminException
-
offloadStatusAsync
java.util.concurrent.CompletableFuture<OffloadProcessStatus> offloadStatusAsync(java.lang.String topic)
Check the status of an ongoing offloading operation for a topic asynchronously.- Parameters:
topic- the topic being offloaded- Returns:
- the status of the offload operation
-
getLastMessageId
org.apache.pulsar.client.api.MessageId getLastMessageId(java.lang.String topic) throws PulsarAdminExceptionGet the last commit message Id of a topic.- Parameters:
topic- the topic name- Returns:
- Throws:
PulsarAdminException
-
getLastMessageIdAsync
java.util.concurrent.CompletableFuture<org.apache.pulsar.client.api.MessageId> getLastMessageIdAsync(java.lang.String topic)
Get the last commit message Id of a topic asynchronously.- Parameters:
topic- the topic name- Returns:
-
getBacklogQuotaMap
java.util.Map<BacklogQuota.BacklogQuotaType,BacklogQuota> getBacklogQuotaMap(java.lang.String topic) throws PulsarAdminException
Get backlog quota map for a topic. Response example:{ "namespace_memory" : { "limit" : "134217728", "policy" : "consumer_backlog_eviction" }, "destination_storage" : { "limit" : "-1", "policy" : "producer_exception" } }- Parameters:
topic- Topic name- Throws:
PulsarAdminException.NotAuthorizedException- Permission deniedPulsarAdminException.NotFoundException- Topic does not existPulsarAdminException- Unexpected error
-
getBacklogQuotaMap
java.util.Map<BacklogQuota.BacklogQuotaType,BacklogQuota> getBacklogQuotaMap(java.lang.String topic, boolean applied) throws PulsarAdminException
Get applied backlog quota map for a topic.- Parameters:
topic-applied-- Returns:
- Throws:
PulsarAdminException
-
setBacklogQuota
void setBacklogQuota(java.lang.String topic, BacklogQuota backlogQuota) throws PulsarAdminExceptionSet a backlog quota for a topic. The backlog quota can be set on this resource:Request parameter example:
{ "limit" : "134217728", "policy" : "consumer_backlog_eviction" }- Parameters:
topic- Topic namebacklogQuota- the new BacklogQuota- Throws:
PulsarAdminException.NotAuthorizedException- Don't have admin permissionPulsarAdminException.NotFoundException- Topic does not existPulsarAdminException- Unexpected error
-
removeBacklogQuota
void removeBacklogQuota(java.lang.String topic) throws PulsarAdminExceptionRemove a backlog quota policy from a topic. The namespace backlog policy will fall back to the default.- Parameters:
topic- Topic name- Throws:
PulsarAdminException.NotAuthorizedException- Don't have admin permissionPulsarAdminException.NotFoundException- Topic does not existPulsarAdminException- Unexpected error
-
getDelayedDeliveryPolicy
DelayedDeliveryPolicies getDelayedDeliveryPolicy(java.lang.String topic, boolean applied) throws PulsarAdminException
Get the delayed delivery policy applied for a specified topic.- Parameters:
topic-applied-- Returns:
- Throws:
PulsarAdminException
-
getDelayedDeliveryPolicyAsync
java.util.concurrent.CompletableFuture<DelayedDeliveryPolicies> getDelayedDeliveryPolicyAsync(java.lang.String topic, boolean applied)
Get the delayed delivery policy applied for a specified topic asynchronously.- Parameters:
topic-applied-- Returns:
-
getDelayedDeliveryPolicy
DelayedDeliveryPolicies getDelayedDeliveryPolicy(java.lang.String topic) throws PulsarAdminException
Get the delayed delivery policy for a specified topic.- Parameters:
topic-- Returns:
- Throws:
PulsarAdminException
-
getDelayedDeliveryPolicyAsync
java.util.concurrent.CompletableFuture<DelayedDeliveryPolicies> getDelayedDeliveryPolicyAsync(java.lang.String topic)
Get the delayed delivery policy for a specified topic asynchronously.- Parameters:
topic-- Returns:
-
setDelayedDeliveryPolicy
void setDelayedDeliveryPolicy(java.lang.String topic, DelayedDeliveryPolicies delayedDeliveryPolicies) throws PulsarAdminExceptionSet the delayed delivery policy for a specified topic.- Parameters:
topic-delayedDeliveryPolicies-- Throws:
PulsarAdminException
-
setDelayedDeliveryPolicyAsync
java.util.concurrent.CompletableFuture<java.lang.Void> setDelayedDeliveryPolicyAsync(java.lang.String topic, DelayedDeliveryPolicies delayedDeliveryPolicies)Set the delayed delivery policy for a specified topic asynchronously.- Parameters:
topic-delayedDeliveryPolicies-- Returns:
-
removeDelayedDeliveryPolicyAsync
java.util.concurrent.CompletableFuture<java.lang.Void> removeDelayedDeliveryPolicyAsync(java.lang.String topic)
Remove the delayed delivery policy for a specified topic asynchronously.- Parameters:
topic-- Returns:
-
removeDelayedDeliveryPolicy
void removeDelayedDeliveryPolicy(java.lang.String topic) throws PulsarAdminExceptionRemove the delayed delivery policy for a specified topic.- Parameters:
topic-- Throws:
PulsarAdminException
-
setMessageTTL
void setMessageTTL(java.lang.String topic, int messageTTLInSecond) throws PulsarAdminExceptionSet message TTL for a topic.- Parameters:
topic- Topic namemessageTTLInSecond- Message TTL in second.- Throws:
PulsarAdminException.NotAuthorizedException- Don't have admin permissionPulsarAdminException.NotFoundException- Topic does not existPulsarAdminException- Unexpected error
-
getMessageTTL
java.lang.Integer getMessageTTL(java.lang.String topic) throws PulsarAdminExceptionGet message TTL for a topic.- Parameters:
topic-- Returns:
- Message TTL in second.
- Throws:
PulsarAdminException.NotAuthorizedException- Don't have admin permissionPulsarAdminException.NotFoundException- Topic does not existPulsarAdminException- Unexpected error
-
getMessageTTL
java.lang.Integer getMessageTTL(java.lang.String topic, boolean applied) throws PulsarAdminExceptionGet message TTL applied for a topic.- Parameters:
topic-- Returns:
- Throws:
PulsarAdminException
-
removeMessageTTL
void removeMessageTTL(java.lang.String topic) throws PulsarAdminExceptionRemove message TTL for a topic.- Parameters:
topic-- Throws:
PulsarAdminException.NotAuthorizedException- Don't have admin permissionPulsarAdminException.NotFoundException- Topic does not existPulsarAdminException- Unexpected error
-
setRetention
void setRetention(java.lang.String topic, RetentionPolicies retention) throws PulsarAdminExceptionSet the retention configuration on a topic. Set the retention configuration on a topic. This operation requires Pulsar super-user access. Request parameter example:{ "retentionTimeInMinutes" : 60, // how long to retain messages "retentionSizeInMB" : 1024, // retention backlog limit }- Parameters:
topic- Topic name- Throws:
PulsarAdminException.NotAuthorizedException- Don't have admin permissionPulsarAdminException.NotFoundException- Topic does not existPulsarAdminException.ConflictException- Concurrent modificationPulsarAdminException- Unexpected error
-
setRetentionAsync
java.util.concurrent.CompletableFuture<java.lang.Void> setRetentionAsync(java.lang.String topic, RetentionPolicies retention)Set the retention configuration for all the topics on a topic asynchronously. Set the retention configuration on a topic. This operation requires Pulsar super-user access. Request parameter example:{ "retentionTimeInMinutes" : 60, // how long to retain messages "retentionSizeInMB" : 1024, // retention backlog limit }- Parameters:
topic- Topic name
-
getRetention
RetentionPolicies getRetention(java.lang.String topic) throws PulsarAdminException
Get the retention configuration for a topic. Get the retention configuration for a topic. Response example:{ "retentionTimeInMinutes" : 60, // how long to retain messages "retentionSizeInMB" : 1024, // retention backlog limit }- Parameters:
topic- Topic name- Throws:
PulsarAdminException.NotAuthorizedException- Don't have admin permissionPulsarAdminException.NotFoundException- Topic does not existPulsarAdminException.ConflictException- Concurrent modificationPulsarAdminException- Unexpected error
-
getRetentionAsync
java.util.concurrent.CompletableFuture<RetentionPolicies> getRetentionAsync(java.lang.String topic)
Get the retention configuration for a topic asynchronously. Get the retention configuration for a topic.- Parameters:
topic- Topic name
-
getRetention
RetentionPolicies getRetention(java.lang.String topic, boolean applied) throws PulsarAdminException
Get the applied retention configuration for a topic.- Parameters:
topic-applied-- Returns:
- Throws:
PulsarAdminException
-
getRetentionAsync
java.util.concurrent.CompletableFuture<RetentionPolicies> getRetentionAsync(java.lang.String topic, boolean applied)
Get the applied retention configuration for a topic asynchronously.- Parameters:
topic-applied-- Returns:
-
removeRetention
void removeRetention(java.lang.String topic) throws PulsarAdminExceptionRemove the retention configuration for all the topics on a topic. Remove the retention configuration on a topic. This operation requires Pulsar super-user access. Request parameter example:- Parameters:
topic- Topic name- Throws:
PulsarAdminException.NotAuthorizedException- Don't have admin permissionPulsarAdminException.NotFoundException- Topic does not existPulsarAdminException.ConflictException- Concurrent modificationPulsarAdminException- Unexpected error
-
removeRetentionAsync
java.util.concurrent.CompletableFuture<java.lang.Void> removeRetentionAsync(java.lang.String topic)
Remove the retention configuration for all the topics on a topic asynchronously. Remove the retention configuration on a topic. This operation requires Pulsar super-user access. Request parameter example:{ "retentionTimeInMinutes" : 60, // how long to retain messages "retentionSizeInMB" : 1024, // retention backlog limit }- Parameters:
topic- Topic name
-
getMaxUnackedMessagesOnConsumer
java.lang.Integer getMaxUnackedMessagesOnConsumer(java.lang.String topic) throws PulsarAdminExceptionget max unacked messages on consumer of a topic.- Parameters:
topic-- Returns:
- Throws:
PulsarAdminException
-
getMaxUnackedMessagesOnConsumerAsync
java.util.concurrent.CompletableFuture<java.lang.Integer> getMaxUnackedMessagesOnConsumerAsync(java.lang.String topic)
get max unacked messages on consumer of a topic asynchronously.- Parameters:
topic-- Returns:
-
getMaxUnackedMessagesOnConsumer
java.lang.Integer getMaxUnackedMessagesOnConsumer(java.lang.String topic, boolean applied) throws PulsarAdminExceptionget applied max unacked messages on consumer of a topic.- Parameters:
topic-applied-- Returns:
- Throws:
PulsarAdminException
-
getMaxUnackedMessagesOnConsumerAsync
java.util.concurrent.CompletableFuture<java.lang.Integer> getMaxUnackedMessagesOnConsumerAsync(java.lang.String topic, boolean applied)get applied max unacked messages on consumer of a topic asynchronously.- Parameters:
topic-applied-- Returns:
-
setMaxUnackedMessagesOnConsumer
void setMaxUnackedMessagesOnConsumer(java.lang.String topic, int maxNum) throws PulsarAdminExceptionset max unacked messages on consumer of a topic.- Parameters:
topic-maxNum-- Throws:
PulsarAdminException
-
setMaxUnackedMessagesOnConsumerAsync
java.util.concurrent.CompletableFuture<java.lang.Void> setMaxUnackedMessagesOnConsumerAsync(java.lang.String topic, int maxNum)set max unacked messages on consumer of a topic asynchronously.- Parameters:
topic-maxNum-- Returns:
-
removeMaxUnackedMessagesOnConsumer
void removeMaxUnackedMessagesOnConsumer(java.lang.String topic) throws PulsarAdminExceptionremove max unacked messages on consumer of a topic.- Parameters:
topic-- Throws:
PulsarAdminException
-
removeMaxUnackedMessagesOnConsumerAsync
java.util.concurrent.CompletableFuture<java.lang.Void> removeMaxUnackedMessagesOnConsumerAsync(java.lang.String topic)
remove max unacked messages on consumer of a topic asynchronously.- Parameters:
topic-- Returns:
-
getInactiveTopicPolicies
InactiveTopicPolicies getInactiveTopicPolicies(java.lang.String topic, boolean applied) throws PulsarAdminException
Get inactive topic policies applied for a topic.- Parameters:
topic-- Returns:
- Throws:
PulsarAdminException
-
getInactiveTopicPoliciesAsync
java.util.concurrent.CompletableFuture<InactiveTopicPolicies> getInactiveTopicPoliciesAsync(java.lang.String topic, boolean applied)
Get inactive topic policies applied for a topic asynchronously.- Parameters:
topic-applied-- Returns:
-
getInactiveTopicPolicies
InactiveTopicPolicies getInactiveTopicPolicies(java.lang.String topic) throws PulsarAdminException
get inactive topic policies of a topic.- Parameters:
topic-- Returns:
- Throws:
PulsarAdminException
-
getInactiveTopicPoliciesAsync
java.util.concurrent.CompletableFuture<InactiveTopicPolicies> getInactiveTopicPoliciesAsync(java.lang.String topic)
get inactive topic policies of a topic asynchronously.- Parameters:
topic-- Returns:
-
setInactiveTopicPolicies
void setInactiveTopicPolicies(java.lang.String topic, InactiveTopicPolicies inactiveTopicPolicies) throws PulsarAdminExceptionset inactive topic policies of a topic.- Parameters:
topic-inactiveTopicPolicies-- Throws:
PulsarAdminException
-
setInactiveTopicPoliciesAsync
java.util.concurrent.CompletableFuture<java.lang.Void> setInactiveTopicPoliciesAsync(java.lang.String topic, InactiveTopicPolicies inactiveTopicPolicies)set inactive topic policies of a topic asynchronously.- Parameters:
topic-inactiveTopicPolicies-- Returns:
-
removeInactiveTopicPolicies
void removeInactiveTopicPolicies(java.lang.String topic) throws PulsarAdminExceptionremove inactive topic policies of a topic.- Parameters:
topic-- Throws:
PulsarAdminException
-
removeInactiveTopicPoliciesAsync
java.util.concurrent.CompletableFuture<java.lang.Void> removeInactiveTopicPoliciesAsync(java.lang.String topic)
remove inactive topic policies of a topic asynchronously.- Parameters:
topic-- Returns:
-
getOffloadPolicies
OffloadPolicies getOffloadPolicies(java.lang.String topic) throws PulsarAdminException
get offload policies of a topic.- Parameters:
topic-- Returns:
- Throws:
PulsarAdminException
-
getOffloadPoliciesAsync
java.util.concurrent.CompletableFuture<OffloadPolicies> getOffloadPoliciesAsync(java.lang.String topic)
get offload policies of a topic asynchronously.- Parameters:
topic-- Returns:
-
getOffloadPolicies
OffloadPolicies getOffloadPolicies(java.lang.String topic, boolean applied) throws PulsarAdminException
get applied offload policies of a topic.- Parameters:
topic-- Returns:
- Throws:
PulsarAdminException
-
getOffloadPoliciesAsync
java.util.concurrent.CompletableFuture<OffloadPolicies> getOffloadPoliciesAsync(java.lang.String topic, boolean applied)
get applied offload policies of a topic asynchronously.- Parameters:
topic-- Returns:
-
setOffloadPolicies
void setOffloadPolicies(java.lang.String topic, OffloadPolicies offloadPolicies) throws PulsarAdminExceptionset offload policies of a topic.- Parameters:
topic-offloadPolicies-- Throws:
PulsarAdminException
-
setOffloadPoliciesAsync
java.util.concurrent.CompletableFuture<java.lang.Void> setOffloadPoliciesAsync(java.lang.String topic, OffloadPolicies offloadPolicies)set offload policies of a topic asynchronously.- Parameters:
topic-offloadPolicies-- Returns:
-
removeOffloadPolicies
void removeOffloadPolicies(java.lang.String topic) throws PulsarAdminExceptionremove offload policies of a topic.- Parameters:
topic-- Throws:
PulsarAdminException
-
removeOffloadPoliciesAsync
java.util.concurrent.CompletableFuture<java.lang.Void> removeOffloadPoliciesAsync(java.lang.String topic)
remove offload policies of a topic asynchronously.- Parameters:
topic-- Returns:
-
getMaxUnackedMessagesOnSubscription
java.lang.Integer getMaxUnackedMessagesOnSubscription(java.lang.String topic) throws PulsarAdminExceptionget max unacked messages on subscription of a topic.- Parameters:
topic-- Returns:
- Throws:
PulsarAdminException
-
getMaxUnackedMessagesOnSubscriptionAsync
java.util.concurrent.CompletableFuture<java.lang.Integer> getMaxUnackedMessagesOnSubscriptionAsync(java.lang.String topic)
get max unacked messages on subscription of a topic asynchronously.- Parameters:
topic-- Returns:
-
getMaxUnackedMessagesOnSubscription
java.lang.Integer getMaxUnackedMessagesOnSubscription(java.lang.String topic, boolean applied) throws PulsarAdminExceptionget max unacked messages on subscription of a topic.- Parameters:
topic-- Returns:
- Throws:
PulsarAdminException
-
getMaxUnackedMessagesOnSubscriptionAsync
java.util.concurrent.CompletableFuture<java.lang.Integer> getMaxUnackedMessagesOnSubscriptionAsync(java.lang.String topic, boolean applied)get max unacked messages on subscription of a topic asynchronously.- Parameters:
topic-- Returns:
-
setMaxUnackedMessagesOnSubscription
void setMaxUnackedMessagesOnSubscription(java.lang.String topic, int maxNum) throws PulsarAdminExceptionset max unacked messages on subscription of a topic.- Parameters:
topic-maxNum-- Throws:
PulsarAdminException
-
setMaxUnackedMessagesOnSubscriptionAsync
java.util.concurrent.CompletableFuture<java.lang.Void> setMaxUnackedMessagesOnSubscriptionAsync(java.lang.String topic, int maxNum)set max unacked messages on subscription of a topic asynchronously.- Parameters:
topic-maxNum-- Returns:
-
removeMaxUnackedMessagesOnSubscription
void removeMaxUnackedMessagesOnSubscription(java.lang.String topic) throws PulsarAdminExceptionremove max unacked messages on subscription of a topic.- Parameters:
topic-- Throws:
PulsarAdminException
-
removeMaxUnackedMessagesOnSubscriptionAsync
java.util.concurrent.CompletableFuture<java.lang.Void> removeMaxUnackedMessagesOnSubscriptionAsync(java.lang.String topic)
remove max unacked messages on subscription of a topic asynchronously.- Parameters:
topic-- Returns:
-
setPersistence
void setPersistence(java.lang.String topic, PersistencePolicies persistencePolicies) throws PulsarAdminExceptionSet the configuration of persistence policies for specified topic.- Parameters:
topic- Topic namepersistencePolicies- Configuration of bookkeeper persistence policies- Throws:
PulsarAdminException- Unexpected error
-
setPersistenceAsync
java.util.concurrent.CompletableFuture<java.lang.Void> setPersistenceAsync(java.lang.String topic, PersistencePolicies persistencePolicies)Set the configuration of persistence policies for specified topic asynchronously.- Parameters:
topic- Topic namepersistencePolicies- Configuration of bookkeeper persistence policies
-
getPersistence
PersistencePolicies getPersistence(java.lang.String topic) throws PulsarAdminException
Get the configuration of persistence policies for specified topic.- Parameters:
topic- Topic name- Returns:
- Configuration of bookkeeper persistence policies
- Throws:
PulsarAdminException- Unexpected error
-
getPersistenceAsync
java.util.concurrent.CompletableFuture<PersistencePolicies> getPersistenceAsync(java.lang.String topic)
Get the configuration of persistence policies for specified topic asynchronously.- Parameters:
topic- Topic name
-
getPersistence
PersistencePolicies getPersistence(java.lang.String topic, boolean applied) throws PulsarAdminException
Get the applied configuration of persistence policies for specified topic.- Parameters:
topic- Topic name- Returns:
- Configuration of bookkeeper persistence policies
- Throws:
PulsarAdminException- Unexpected error
-
getPersistenceAsync
java.util.concurrent.CompletableFuture<PersistencePolicies> getPersistenceAsync(java.lang.String topic, boolean applied)
Get the applied configuration of persistence policies for specified topic asynchronously.- Parameters:
topic- Topic name
-
removePersistence
void removePersistence(java.lang.String topic) throws PulsarAdminExceptionRemove the configuration of persistence policies for specified topic.- Parameters:
topic- Topic name- Throws:
PulsarAdminException- Unexpected error
-
removePersistenceAsync
java.util.concurrent.CompletableFuture<java.lang.Void> removePersistenceAsync(java.lang.String topic)
Remove the configuration of persistence policies for specified topic asynchronously.- Parameters:
topic- Topic name
-
getDeduplicationEnabled
@Deprecated java.lang.Boolean getDeduplicationEnabled(java.lang.String topic) throws PulsarAdminExceptionDeprecated.get deduplication enabled of a topic.- Parameters:
topic-- Returns:
- Throws:
PulsarAdminException
-
getDeduplicationEnabledAsync
@Deprecated java.util.concurrent.CompletableFuture<java.lang.Boolean> getDeduplicationEnabledAsync(java.lang.String topic)
Deprecated.get deduplication enabled of a topic asynchronously.- Parameters:
topic-- Returns:
-
getDeduplicationStatus
java.lang.Boolean getDeduplicationStatus(java.lang.String topic) throws PulsarAdminExceptionget deduplication enabled of a topic.- Parameters:
topic-- Returns:
- Throws:
PulsarAdminException
-
getDeduplicationStatusAsync
java.util.concurrent.CompletableFuture<java.lang.Boolean> getDeduplicationStatusAsync(java.lang.String topic)
get deduplication enabled of a topic asynchronously.- Parameters:
topic-- Returns:
-
getDeduplicationStatus
java.lang.Boolean getDeduplicationStatus(java.lang.String topic, boolean applied) throws PulsarAdminExceptionget applied deduplication enabled of a topic.- Parameters:
topic-- Returns:
- Throws:
PulsarAdminException
-
getDeduplicationStatusAsync
java.util.concurrent.CompletableFuture<java.lang.Boolean> getDeduplicationStatusAsync(java.lang.String topic, boolean applied)get applied deduplication enabled of a topic asynchronously.- Parameters:
topic-- Returns:
-
enableDeduplication
@Deprecated void enableDeduplication(java.lang.String topic, boolean enabled) throws PulsarAdminExceptionDeprecated.set deduplication enabled of a topic.- Parameters:
topic-enabled-- Throws:
PulsarAdminException
-
enableDeduplicationAsync
@Deprecated java.util.concurrent.CompletableFuture<java.lang.Void> enableDeduplicationAsync(java.lang.String topic, boolean enabled)Deprecated.set deduplication enabled of a topic asynchronously.- Parameters:
topic-enabled-- Returns:
-
setDeduplicationStatus
void setDeduplicationStatus(java.lang.String topic, boolean enabled) throws PulsarAdminExceptionset deduplication enabled of a topic.- Parameters:
topic-enabled-- Throws:
PulsarAdminException
-
setDeduplicationStatusAsync
java.util.concurrent.CompletableFuture<java.lang.Void> setDeduplicationStatusAsync(java.lang.String topic, boolean enabled)set deduplication enabled of a topic asynchronously.- Parameters:
topic-enabled-- Returns:
-
disableDeduplication
@Deprecated void disableDeduplication(java.lang.String topic) throws PulsarAdminExceptionDeprecated.remove deduplication enabled of a topic.- Parameters:
topic-- Throws:
PulsarAdminException
-
disableDeduplicationAsync
@Deprecated java.util.concurrent.CompletableFuture<java.lang.Void> disableDeduplicationAsync(java.lang.String topic)
Deprecated.remove deduplication enabled of a topic asynchronously.- Parameters:
topic-- Returns:
-
removeDeduplicationStatus
void removeDeduplicationStatus(java.lang.String topic) throws PulsarAdminExceptionremove deduplication enabled of a topic.- Parameters:
topic-- Throws:
PulsarAdminException
-
removeDeduplicationStatusAsync
java.util.concurrent.CompletableFuture<java.lang.Void> removeDeduplicationStatusAsync(java.lang.String topic)
remove deduplication enabled of a topic asynchronously.- Parameters:
topic-- Returns:
-
setDispatchRate
void setDispatchRate(java.lang.String topic, DispatchRate dispatchRate) throws PulsarAdminExceptionSet message-dispatch-rate (topic can dispatch this many messages per second).- Parameters:
topic-dispatchRate- number of messages per second- Throws:
PulsarAdminException- Unexpected error
-
setDispatchRateAsync
java.util.concurrent.CompletableFuture<java.lang.Void> setDispatchRateAsync(java.lang.String topic, DispatchRate dispatchRate)Set message-dispatch-rate asynchronously. topic can dispatch this many messages per second- Parameters:
topic-dispatchRate- number of messages per second
-
getDispatchRate
DispatchRate getDispatchRate(java.lang.String topic) throws PulsarAdminException
Get message-dispatch-rate (topic can dispatch this many messages per second).- Parameters:
topic-- Throws:
PulsarAdminException- Unexpected error
-
getDispatchRateAsync
java.util.concurrent.CompletableFuture<DispatchRate> getDispatchRateAsync(java.lang.String topic)
Get message-dispatch-rate asynchronously. Topic can dispatch this many messages per second.- Parameters:
topic-
-
getDispatchRate
DispatchRate getDispatchRate(java.lang.String topic, boolean applied) throws PulsarAdminException
Get applied message-dispatch-rate (topic can dispatch this many messages per second).- Parameters:
topic-- Throws:
PulsarAdminException- Unexpected error
-
getDispatchRateAsync
java.util.concurrent.CompletableFuture<DispatchRate> getDispatchRateAsync(java.lang.String topic, boolean applied)
Get applied message-dispatch-rate asynchronously. Topic can dispatch this many messages per second.- Parameters:
topic-
-
removeDispatchRate
void removeDispatchRate(java.lang.String topic) throws PulsarAdminExceptionRemove message-dispatch-rate. Remove topic message dispatch rate- Parameters:
topic-- Throws:
PulsarAdminException- unexpected error
-
removeDispatchRateAsync
java.util.concurrent.CompletableFuture<java.lang.Void> removeDispatchRateAsync(java.lang.String topic) throws PulsarAdminExceptionRemove message-dispatch-rate asynchronously. Remove topic message dispatch rate- Parameters:
topic-- Throws:
PulsarAdminException- unexpected error
-
setSubscriptionDispatchRate
void setSubscriptionDispatchRate(java.lang.String topic, DispatchRate dispatchRate) throws PulsarAdminExceptionSet subscription-message-dispatch-rate for the topic. Subscriptions under this namespace can dispatch this many messages per second- Parameters:
topic-dispatchRate- number of messages per second- Throws:
PulsarAdminException- Unexpected error
-
setSubscriptionDispatchRateAsync
java.util.concurrent.CompletableFuture<java.lang.Void> setSubscriptionDispatchRateAsync(java.lang.String topic, DispatchRate dispatchRate)Set subscription-message-dispatch-rate for the topic asynchronously. Subscriptions under this namespace can dispatch this many messages per second.- Parameters:
topic-dispatchRate- number of messages per second
-
getSubscriptionDispatchRate
DispatchRate getSubscriptionDispatchRate(java.lang.String namespace, boolean applied) throws PulsarAdminException
Get applied subscription-message-dispatch-rate. Subscriptions under this namespace can dispatch this many messages per second.- Parameters:
namespace-- Throws:
PulsarAdminException- Unexpected error
-
getSubscriptionDispatchRateAsync
java.util.concurrent.CompletableFuture<DispatchRate> getSubscriptionDispatchRateAsync(java.lang.String namespace, boolean applied)
Get applied subscription-message-dispatch-rate asynchronously. Subscriptions under this namespace can dispatch this many messages per second.- Parameters:
namespace-
-
getSubscriptionDispatchRate
DispatchRate getSubscriptionDispatchRate(java.lang.String topic) throws PulsarAdminException
Get subscription-message-dispatch-rate for the topic. Subscriptions under this namespace can dispatch this many messages per second.- Parameters:
topic-- Throws:
PulsarAdminException- Unexpected error
-
getSubscriptionDispatchRateAsync
java.util.concurrent.CompletableFuture<DispatchRate> getSubscriptionDispatchRateAsync(java.lang.String topic)
Get subscription-message-dispatch-rate asynchronously. Subscriptions under this namespace can dispatch this many messages per second.- Parameters:
topic-
-
removeSubscriptionDispatchRate
void removeSubscriptionDispatchRate(java.lang.String topic) throws PulsarAdminExceptionRemove subscription-message-dispatch-rate for a topic.- Parameters:
topic- Topic name- Throws:
PulsarAdminException- Unexpected error
-
removeSubscriptionDispatchRateAsync
java.util.concurrent.CompletableFuture<java.lang.Void> removeSubscriptionDispatchRateAsync(java.lang.String topic)
Remove subscription-message-dispatch-rate for a topic asynchronously.- Parameters:
topic- Topic name
-
setReplicatorDispatchRate
void setReplicatorDispatchRate(java.lang.String topic, DispatchRate dispatchRate) throws PulsarAdminExceptionSet replicatorDispatchRate for the topic. Replicator dispatch rate under this topic can dispatch this many messages per second- Parameters:
topic-dispatchRate- number of messages per second- Throws:
PulsarAdminException- Unexpected error
-
setReplicatorDispatchRateAsync
java.util.concurrent.CompletableFuture<java.lang.Void> setReplicatorDispatchRateAsync(java.lang.String topic, DispatchRate dispatchRate)Set replicatorDispatchRate for the topic asynchronously. Replicator dispatch rate under this topic can dispatch this many messages per second.- Parameters:
topic-dispatchRate- number of messages per second
-
getReplicatorDispatchRate
DispatchRate getReplicatorDispatchRate(java.lang.String topic) throws PulsarAdminException
Get replicatorDispatchRate for the topic. Replicator dispatch rate under this topic can dispatch this many messages per second.- Parameters:
topic-- Throws:
PulsarAdminException- Unexpected error
-
getReplicatorDispatchRateAsync
java.util.concurrent.CompletableFuture<DispatchRate> getReplicatorDispatchRateAsync(java.lang.String topic)
Get replicatorDispatchRate asynchronously. Replicator dispatch rate under this topic can dispatch this many messages per second.- Parameters:
topic-
-
getReplicatorDispatchRate
DispatchRate getReplicatorDispatchRate(java.lang.String topic, boolean applied) throws PulsarAdminException
Get applied replicatorDispatchRate for the topic.- Parameters:
topic-applied-- Returns:
- Throws:
PulsarAdminException
-
getReplicatorDispatchRateAsync
java.util.concurrent.CompletableFuture<DispatchRate> getReplicatorDispatchRateAsync(java.lang.String topic, boolean applied)
Get applied replicatorDispatchRate asynchronously.- Parameters:
topic-applied-- Returns:
-
removeReplicatorDispatchRate
void removeReplicatorDispatchRate(java.lang.String topic) throws PulsarAdminExceptionRemove replicatorDispatchRate for a topic.- Parameters:
topic- Topic name- Throws:
PulsarAdminException- Unexpected error
-
removeReplicatorDispatchRateAsync
java.util.concurrent.CompletableFuture<java.lang.Void> removeReplicatorDispatchRateAsync(java.lang.String topic)
Remove replicatorDispatchRate for a topic asynchronously.- Parameters:
topic- Topic name
-
getCompactionThreshold
java.lang.Long getCompactionThreshold(java.lang.String topic) throws PulsarAdminExceptionGet the compactionThreshold for a topic. The maximum number of bytes can have before compaction is triggered. 0 disables. Response example:10000000- Parameters:
topic- Topic name- Throws:
PulsarAdminException.NotAuthorizedException- Don't have admin permissionPulsarAdminException.NotFoundException- Namespace does not existPulsarAdminException- Unexpected error
-
getCompactionThresholdAsync
java.util.concurrent.CompletableFuture<java.lang.Long> getCompactionThresholdAsync(java.lang.String topic)
Get the compactionThreshold for a topic asynchronously. The maximum number of bytes can have before compaction is triggered. 0 disables. Response example:10000000- Parameters:
topic- Topic name
-
getCompactionThreshold
java.lang.Long getCompactionThreshold(java.lang.String topic, boolean applied) throws PulsarAdminExceptionGet the compactionThreshold for a topic. The maximum number of bytes can have before compaction is triggered. 0 disables.- Parameters:
topic- Topic name- Throws:
PulsarAdminException.NotAuthorizedException- Don't have admin permissionPulsarAdminException.NotFoundException- Namespace does not existPulsarAdminException- Unexpected error
-
getCompactionThresholdAsync
java.util.concurrent.CompletableFuture<java.lang.Long> getCompactionThresholdAsync(java.lang.String topic, boolean applied)Get the compactionThreshold for a topic asynchronously. The maximum number of bytes can have before compaction is triggered. 0 disables.- Parameters:
topic- Topic name
-
setCompactionThreshold
void setCompactionThreshold(java.lang.String topic, long compactionThreshold) throws PulsarAdminExceptionSet the compactionThreshold for a topic. The maximum number of bytes can have before compaction is triggered. 0 disables. Request example:10000000- Parameters:
topic- Topic namecompactionThreshold- maximum number of backlog bytes before compaction is triggered- Throws:
PulsarAdminException.NotAuthorizedException- Don't have admin permissionPulsarAdminException.NotFoundException- Namespace does not existPulsarAdminException- Unexpected error
-
setCompactionThresholdAsync
java.util.concurrent.CompletableFuture<java.lang.Void> setCompactionThresholdAsync(java.lang.String topic, long compactionThreshold)Set the compactionThreshold for a topic asynchronously. The maximum number of bytes can have before compaction is triggered. 0 disables. Request example:10000000- Parameters:
topic- Topic namecompactionThreshold- maximum number of backlog bytes before compaction is triggered
-
removeCompactionThreshold
void removeCompactionThreshold(java.lang.String topic) throws PulsarAdminExceptionRemove the compactionThreshold for a topic.- Parameters:
topic- Topic name- Throws:
PulsarAdminException- Unexpected error
-
removeCompactionThresholdAsync
java.util.concurrent.CompletableFuture<java.lang.Void> removeCompactionThresholdAsync(java.lang.String topic)
Remove the compactionThreshold for a topic asynchronously.- Parameters:
topic- Topic name
-
setPublishRate
void setPublishRate(java.lang.String topic, PublishRate publishMsgRate) throws PulsarAdminExceptionSet message-publish-rate (topics can publish this many messages per second).- Parameters:
topic-publishMsgRate- number of messages per second- Throws:
PulsarAdminException- Unexpected error
-
setPublishRateAsync
java.util.concurrent.CompletableFuture<java.lang.Void> setPublishRateAsync(java.lang.String topic, PublishRate publishMsgRate)Set message-publish-rate (topics can publish this many messages per second) asynchronously.- Parameters:
topic-publishMsgRate- number of messages per second
-
getPublishRate
PublishRate getPublishRate(java.lang.String topic) throws PulsarAdminException
Get message-publish-rate (topics can publish this many messages per second).- Parameters:
topic-- Returns:
- number of messages per second
- Throws:
PulsarAdminException- Unexpected error
-
getPublishRateAsync
java.util.concurrent.CompletableFuture<PublishRate> getPublishRateAsync(java.lang.String topic)
Get message-publish-rate (topics can publish this many messages per second) asynchronously.- Parameters:
topic-- Returns:
- number of messages per second
-
removePublishRate
void removePublishRate(java.lang.String topic) throws PulsarAdminExceptionRemove message-publish-rate. Remove topic message publish rate- Parameters:
topic-- Throws:
PulsarAdminException- unexpected error
-
removePublishRateAsync
java.util.concurrent.CompletableFuture<java.lang.Void> removePublishRateAsync(java.lang.String topic) throws PulsarAdminExceptionRemove message-publish-rate asynchronously. Remove topic message publish rate- Parameters:
topic-- Throws:
PulsarAdminException- unexpected error
-
getMaxConsumersPerSubscription
java.lang.Integer getMaxConsumersPerSubscription(java.lang.String topic) throws PulsarAdminExceptionGet the maxConsumersPerSubscription for a topic. Response example:0- Parameters:
topic- Topic name- Throws:
PulsarAdminException.NotAuthorizedException- Don't have admin permissionPulsarAdminException.NotFoundException- Namespace does not existPulsarAdminException- Unexpected error
-
getMaxConsumersPerSubscriptionAsync
java.util.concurrent.CompletableFuture<java.lang.Integer> getMaxConsumersPerSubscriptionAsync(java.lang.String topic)
Get the maxConsumersPerSubscription for a topic asynchronously. Response example:0- Parameters:
topic- Topic name
-
setMaxConsumersPerSubscription
void setMaxConsumersPerSubscription(java.lang.String topic, int maxConsumersPerSubscription) throws PulsarAdminExceptionSet maxConsumersPerSubscription for a topic. Request example:10- Parameters:
topic- Topic namemaxConsumersPerSubscription- maxConsumersPerSubscription value for a namespace- Throws:
PulsarAdminException.NotAuthorizedException- Don't have admin permissionPulsarAdminException.NotFoundException- Namespace does not existPulsarAdminException- Unexpected error
-
setMaxConsumersPerSubscriptionAsync
java.util.concurrent.CompletableFuture<java.lang.Void> setMaxConsumersPerSubscriptionAsync(java.lang.String topic, int maxConsumersPerSubscription)Set maxConsumersPerSubscription for a topic asynchronously. Request example:10- Parameters:
topic- Topic namemaxConsumersPerSubscription- maxConsumersPerSubscription value for a namespace
-
removeMaxConsumersPerSubscription
void removeMaxConsumersPerSubscription(java.lang.String topic) throws PulsarAdminExceptionRemove the maxConsumersPerSubscription for a topic.- Parameters:
topic- Topic name- Throws:
PulsarAdminException- Unexpected error
-
removeMaxConsumersPerSubscriptionAsync
java.util.concurrent.CompletableFuture<java.lang.Void> removeMaxConsumersPerSubscriptionAsync(java.lang.String topic)
Remove the maxConsumersPerSubscription for a topic asynchronously.- Parameters:
topic- Topic name
-
getMaxProducers
java.lang.Integer getMaxProducers(java.lang.String topic) throws PulsarAdminExceptionGet the max number of producer for specified topic.- Parameters:
topic- Topic name- Returns:
- Configuration of bookkeeper persistence policies
- Throws:
PulsarAdminException- Unexpected error
-
getMaxProducersAsync
java.util.concurrent.CompletableFuture<java.lang.Integer> getMaxProducersAsync(java.lang.String topic)
Get the max number of producer for specified topic asynchronously.- Parameters:
topic- Topic name- Returns:
- Configuration of bookkeeper persistence policies
- Throws:
PulsarAdminException- Unexpected error
-
getMaxProducers
java.lang.Integer getMaxProducers(java.lang.String topic, boolean applied) throws PulsarAdminExceptionGet the max number of producer applied for specified topic.- Parameters:
topic-applied-- Returns:
- Throws:
PulsarAdminException
-
getMaxProducersAsync
java.util.concurrent.CompletableFuture<java.lang.Integer> getMaxProducersAsync(java.lang.String topic, boolean applied)Get the max number of producer applied for specified topic asynchronously.- Parameters:
topic-applied-- Returns:
-
setMaxProducers
void setMaxProducers(java.lang.String topic, int maxProducers) throws PulsarAdminExceptionSet the max number of producer for specified topic.- Parameters:
topic- Topic namemaxProducers- Max number of producer- Throws:
PulsarAdminException- Unexpected error
-
setMaxProducersAsync
java.util.concurrent.CompletableFuture<java.lang.Void> setMaxProducersAsync(java.lang.String topic, int maxProducers)Set the max number of producer for specified topic asynchronously.- Parameters:
topic- Topic namemaxProducers- Max number of producer- Throws:
PulsarAdminException- Unexpected error
-
removeMaxProducers
void removeMaxProducers(java.lang.String topic) throws PulsarAdminExceptionRemove the max number of producer for specified topic.- Parameters:
topic- Topic name- Throws:
PulsarAdminException- Unexpected error
-
removeMaxProducersAsync
java.util.concurrent.CompletableFuture<java.lang.Void> removeMaxProducersAsync(java.lang.String topic)
Remove the max number of producer for specified topic asynchronously.- Parameters:
topic- Topic name
-
getMaxSubscriptionsPerTopic
java.lang.Integer getMaxSubscriptionsPerTopic(java.lang.String topic) throws PulsarAdminExceptionGet the max number of subscriptions for specified topic.- Parameters:
topic- Topic name- Returns:
- Configuration of bookkeeper persistence policies
- Throws:
PulsarAdminException- Unexpected error
-
getMaxSubscriptionsPerTopicAsync
java.util.concurrent.CompletableFuture<java.lang.Integer> getMaxSubscriptionsPerTopicAsync(java.lang.String topic)
Get the max number of subscriptions for specified topic asynchronously.- Parameters:
topic- Topic name- Returns:
- Configuration of bookkeeper persistence policies
- Throws:
PulsarAdminException- Unexpected error
-
setMaxSubscriptionsPerTopic
void setMaxSubscriptionsPerTopic(java.lang.String topic, int maxSubscriptionsPerTopic) throws PulsarAdminExceptionSet the max number of subscriptions for specified topic.- Parameters:
topic- Topic namemaxSubscriptionsPerTopic- Max number of subscriptions- Throws:
PulsarAdminException- Unexpected error
-
setMaxSubscriptionsPerTopicAsync
java.util.concurrent.CompletableFuture<java.lang.Void> setMaxSubscriptionsPerTopicAsync(java.lang.String topic, int maxSubscriptionsPerTopic)Set the max number of subscriptions for specified topic asynchronously.- Parameters:
topic- Topic namemaxSubscriptionsPerTopic- Max number of subscriptions- Throws:
PulsarAdminException- Unexpected error
-
removeMaxSubscriptionsPerTopic
void removeMaxSubscriptionsPerTopic(java.lang.String topic) throws PulsarAdminExceptionRemove the max number of subscriptions for specified topic.- Parameters:
topic- Topic name- Throws:
PulsarAdminException- Unexpected error
-
removeMaxSubscriptionsPerTopicAsync
java.util.concurrent.CompletableFuture<java.lang.Void> removeMaxSubscriptionsPerTopicAsync(java.lang.String topic)
Remove the max number of subscriptions for specified topic asynchronously.- Parameters:
topic- Topic name
-
getMaxMessageSize
java.lang.Integer getMaxMessageSize(java.lang.String topic) throws PulsarAdminExceptionGet the max message size for specified topic.- Parameters:
topic- Topic name- Returns:
- Configuration of bookkeeper persistence policies
- Throws:
PulsarAdminException- Unexpected error
-
getMaxMessageSizeAsync
java.util.concurrent.CompletableFuture<java.lang.Integer> getMaxMessageSizeAsync(java.lang.String topic)
Get the max message size for specified topic asynchronously.- Parameters:
topic- Topic name- Returns:
- Configuration of bookkeeper persistence policies
- Throws:
PulsarAdminException- Unexpected error
-
setMaxMessageSize
void setMaxMessageSize(java.lang.String topic, int maxMessageSize) throws PulsarAdminExceptionSet the max message size for specified topic.- Parameters:
topic- Topic namemaxMessageSize- Max message size of producer- Throws:
PulsarAdminException- Unexpected error
-
setMaxMessageSizeAsync
java.util.concurrent.CompletableFuture<java.lang.Void> setMaxMessageSizeAsync(java.lang.String topic, int maxMessageSize)Set the max message size for specified topic asynchronously.0 disables.- Parameters:
topic- Topic namemaxMessageSize- Max message size of topic- Throws:
PulsarAdminException- Unexpected error
-
removeMaxMessageSize
void removeMaxMessageSize(java.lang.String topic) throws PulsarAdminExceptionRemove the max message size for specified topic.- Parameters:
topic- Topic name- Throws:
PulsarAdminException- Unexpected error
-
removeMaxMessageSizeAsync
java.util.concurrent.CompletableFuture<java.lang.Void> removeMaxMessageSizeAsync(java.lang.String topic)
Remove the max message size for specified topic asynchronously.- Parameters:
topic- Topic name
-
getMaxConsumers
java.lang.Integer getMaxConsumers(java.lang.String topic) throws PulsarAdminExceptionGet the max number of consumer for specified topic.- Parameters:
topic- Topic name- Returns:
- Configuration of bookkeeper persistence policies
- Throws:
PulsarAdminException- Unexpected error
-
getMaxConsumersAsync
java.util.concurrent.CompletableFuture<java.lang.Integer> getMaxConsumersAsync(java.lang.String topic)
Get the max number of consumer for specified topic asynchronously.- Parameters:
topic- Topic name- Returns:
- Configuration of bookkeeper persistence policies
- Throws:
PulsarAdminException- Unexpected error
-
getMaxConsumers
java.lang.Integer getMaxConsumers(java.lang.String topic, boolean applied) throws PulsarAdminExceptionGet the max number of consumer applied for specified topic.- Parameters:
topic-applied-- Returns:
- Throws:
PulsarAdminException
-
getMaxConsumersAsync
java.util.concurrent.CompletableFuture<java.lang.Integer> getMaxConsumersAsync(java.lang.String topic, boolean applied)Get the max number of consumer applied for specified topic asynchronously.- Parameters:
topic-applied-- Returns:
-
setMaxConsumers
void setMaxConsumers(java.lang.String topic, int maxConsumers) throws PulsarAdminExceptionSet the max number of consumer for specified topic.- Parameters:
topic- Topic namemaxConsumers- Max number of consumer- Throws:
PulsarAdminException- Unexpected error
-
setMaxConsumersAsync
java.util.concurrent.CompletableFuture<java.lang.Void> setMaxConsumersAsync(java.lang.String topic, int maxConsumers)Set the max number of consumer for specified topic asynchronously.- Parameters:
topic- Topic namemaxConsumers- Max number of consumer- Throws:
PulsarAdminException- Unexpected error
-
removeMaxConsumers
void removeMaxConsumers(java.lang.String topic) throws PulsarAdminExceptionRemove the max number of consumer for specified topic.- Parameters:
topic- Topic name- Throws:
PulsarAdminException- Unexpected error
-
removeMaxConsumersAsync
java.util.concurrent.CompletableFuture<java.lang.Void> removeMaxConsumersAsync(java.lang.String topic)
Remove the max number of consumer for specified topic asynchronously.- Parameters:
topic- Topic name
-
getDeduplicationSnapshotInterval
java.lang.Integer getDeduplicationSnapshotInterval(java.lang.String topic) throws PulsarAdminExceptionGet the deduplication snapshot interval for specified topic.- Parameters:
topic-- Returns:
- Throws:
PulsarAdminException
-
getDeduplicationSnapshotIntervalAsync
java.util.concurrent.CompletableFuture<java.lang.Integer> getDeduplicationSnapshotIntervalAsync(java.lang.String topic)
Get the deduplication snapshot interval for specified topic asynchronously.- Parameters:
topic-- Returns:
-
setDeduplicationSnapshotInterval
void setDeduplicationSnapshotInterval(java.lang.String topic, int interval) throws PulsarAdminExceptionSet the deduplication snapshot interval for specified topic.- Parameters:
topic-interval-- Throws:
PulsarAdminException
-
setDeduplicationSnapshotIntervalAsync
java.util.concurrent.CompletableFuture<java.lang.Void> setDeduplicationSnapshotIntervalAsync(java.lang.String topic, int interval)Set the deduplication snapshot interval for specified topic asynchronously.- Parameters:
topic-interval-- Returns:
-
removeDeduplicationSnapshotInterval
void removeDeduplicationSnapshotInterval(java.lang.String topic) throws PulsarAdminExceptionRemove the deduplication snapshot interval for specified topic.- Parameters:
topic-- Throws:
PulsarAdminException
-
removeDeduplicationSnapshotIntervalAsync
java.util.concurrent.CompletableFuture<java.lang.Void> removeDeduplicationSnapshotIntervalAsync(java.lang.String topic)
Remove the deduplication snapshot interval for specified topic asynchronously.- Parameters:
topic-- Returns:
-
setSubscriptionTypesEnabled
void setSubscriptionTypesEnabled(java.lang.String topic, java.util.Set<org.apache.pulsar.client.api.SubscriptionType> subscriptionTypesEnabled) throws PulsarAdminExceptionSet is enable sub types.- Parameters:
topic-subscriptionTypesEnabled- is enable subTypes- Throws:
PulsarAdminException- Unexpected error
-
setSubscriptionTypesEnabledAsync
java.util.concurrent.CompletableFuture<java.lang.Void> setSubscriptionTypesEnabledAsync(java.lang.String topic, java.util.Set<org.apache.pulsar.client.api.SubscriptionType> subscriptionTypesEnabled)Set is enable sub types asynchronously.- Parameters:
topic-subscriptionTypesEnabled- is enable subTypes
-
getSubscriptionTypesEnabled
java.util.Set<org.apache.pulsar.client.api.SubscriptionType> getSubscriptionTypesEnabled(java.lang.String topic) throws PulsarAdminExceptionGet is enable sub types.- Parameters:
topic- is topic for get is enable sub types- Returns:
- set of enable sub types
Set - Throws:
PulsarAdminException- Unexpected error
-
getSubscriptionTypesEnabledAsync
java.util.concurrent.CompletableFuture<java.util.Set<org.apache.pulsar.client.api.SubscriptionType>> getSubscriptionTypesEnabledAsync(java.lang.String topic)
Get is enable sub types asynchronously.- Parameters:
topic- is topic for get is enable sub types
-
setSubscribeRate
void setSubscribeRate(java.lang.String topic, SubscribeRate subscribeRate) throws PulsarAdminExceptionSet topic-subscribe-rate (topic will limit by subscribeRate).- Parameters:
topic-subscribeRate- consumer subscribe limit by this subscribeRate- Throws:
PulsarAdminException- Unexpected error
-
setSubscribeRateAsync
java.util.concurrent.CompletableFuture<java.lang.Void> setSubscribeRateAsync(java.lang.String topic, SubscribeRate subscribeRate)Set topic-subscribe-rate (topics will limit by subscribeRate) asynchronously.- Parameters:
topic-subscribeRate- consumer subscribe limit by this subscribeRate
-
getSubscribeRate
SubscribeRate getSubscribeRate(java.lang.String topic) throws PulsarAdminException
Get topic-subscribe-rate (topics allow subscribe times per consumer in a period).- Parameters:
topic-- Throws:
PulsarAdminException- Unexpected error
-
getSubscribeRateAsync
java.util.concurrent.CompletableFuture<SubscribeRate> getSubscribeRateAsync(java.lang.String topic)
Get topic-subscribe-rate asynchronously. Topic allow subscribe times per consumer in a period.- Parameters:
topic-
-
getSubscribeRate
SubscribeRate getSubscribeRate(java.lang.String topic, boolean applied) throws PulsarAdminException
Get applied topic-subscribe-rate (topics allow subscribe times per consumer in a period).- Parameters:
topic-- Throws:
PulsarAdminException- Unexpected error
-
getSubscribeRateAsync
java.util.concurrent.CompletableFuture<SubscribeRate> getSubscribeRateAsync(java.lang.String topic, boolean applied)
Get applied topic-subscribe-rate asynchronously.- Parameters:
topic-
-
removeSubscribeRate
void removeSubscribeRate(java.lang.String topic) throws PulsarAdminExceptionRemove topic-subscribe-rate. Remove topic subscribe rate- Parameters:
topic-- Throws:
PulsarAdminException- unexpected error
-
removeSubscribeRateAsync
java.util.concurrent.CompletableFuture<java.lang.Void> removeSubscribeRateAsync(java.lang.String topic) throws PulsarAdminExceptionRemove topic-subscribe-rate asynchronously. Remove topic subscribe rate- Parameters:
topic-- Throws:
PulsarAdminException- unexpected error
-
examineMessage
org.apache.pulsar.client.api.Message<byte[]> examineMessage(java.lang.String topic, java.lang.String initialPosition, long messagePosition) throws PulsarAdminExceptionExamine a specific message on a topic by position relative to the earliest or the latest message.- Parameters:
topic- Topic nameinitialPosition- Relative start position to examine message. It can be 'latest' or 'earliest'messagePosition- The position of messages (default 1)- Throws:
PulsarAdminException
-
examineMessageAsync
java.util.concurrent.CompletableFuture<org.apache.pulsar.client.api.Message<byte[]>> examineMessageAsync(java.lang.String topic, java.lang.String initialPosition, long messagePosition) throws PulsarAdminExceptionExamine a specific message on a topic by position relative to the earliest or the latest message.- Parameters:
topic- Topic nameinitialPosition- Relative start position to examine message. It can be 'latest' or 'earliest'messagePosition- The position of messages (default 1)- Throws:
PulsarAdminException
-
truncate
void truncate(java.lang.String topic) throws PulsarAdminExceptionTruncate a topic.- Parameters:
topic- topic name- Throws:
PulsarAdminException.NotAuthorizedException- Don't have admin permissionPulsarAdminException- Unexpected error
-
truncateAsync
java.util.concurrent.CompletableFuture<java.lang.Void> truncateAsync(java.lang.String topic)
Truncate a topic asynchronously. The latest ledger cannot be deleted.- Parameters:
topic- topic name- Returns:
- a future that can be used to track when the topic is truncated
-
-