public class TopicsImpl extends BaseResource implements Topics
auth, readTimeoutMs| Constructor and Description |
|---|
TopicsImpl(javax.ws.rs.client.WebTarget web,
org.apache.pulsar.client.api.Authentication auth,
long readTimeoutMs) |
| Modifier and Type | Method and Description |
|---|---|
LongRunningProcessStatus |
compactionStatus(String topic)
Check the status of an ongoing compaction for a topic.
|
CompletableFuture<LongRunningProcessStatus> |
compactionStatusAsync(String topic)
Check the status of an ongoing compaction for a topic asynchronously.
|
void |
createMissedPartitions(String topic)
Create missed partitions for partitioned topic.
|
CompletableFuture<Void> |
createMissedPartitionsAsync(String topic)
Create missed partitions for partitioned topic asynchronously.
|
void |
createNonPartitionedTopic(String topic)
Create a non-partitioned topic.
|
CompletableFuture<Void> |
createNonPartitionedTopicAsync(String topic)
Create a non-partitioned topic asynchronously.
|
void |
createPartitionedTopic(String topic,
int numPartitions)
Create a partitioned topic.
|
CompletableFuture<Void> |
createPartitionedTopicAsync(String topic,
int numPartitions)
Create a partitioned topic asynchronously.
|
void |
createSubscription(String topic,
String subscriptionName,
org.apache.pulsar.client.api.MessageId messageId)
Create a new subscription on a topic.
|
CompletableFuture<Void> |
createSubscriptionAsync(String topic,
String subscriptionName,
org.apache.pulsar.client.api.MessageId messageId)
Create a new subscription on a topic.
|
void |
delete(String topic)
Delete a topic.
|
void |
delete(String topic,
boolean force,
boolean deleteSchema)
Delete a topic.
|
CompletableFuture<Void> |
deleteAsync(String topic)
Delete a topic asynchronously.
|
CompletableFuture<Void> |
deleteAsync(String topic,
boolean force,
boolean deleteSchema)
Delete a topic asynchronously.
|
void |
deletePartitionedTopic(String topic)
Delete a partitioned topic.
|
void |
deletePartitionedTopic(String topic,
boolean force,
boolean deleteSchema)
Delete a partitioned topic.
|
CompletableFuture<Void> |
deletePartitionedTopicAsync(String topic)
Delete a partitioned topic asynchronously.
|
CompletableFuture<Void> |
deletePartitionedTopicAsync(String topic,
boolean force,
boolean deleteSchema)
Delete a partitioned topic asynchronously.
|
void |
deleteSubscription(String topic,
String subName)
Delete a subscription.
|
void |
deleteSubscription(String topic,
String subName,
boolean force)
Delete a subscription.
|
CompletableFuture<Void> |
deleteSubscriptionAsync(String topic,
String subName)
Delete a subscription asynchronously.
|
CompletableFuture<Void> |
deleteSubscriptionAsync(String topic,
String subName,
boolean force)
Delete a subscription asynchronously.
|
void |
disableDeduplication(String topic)
remove deduplication enabled of a topic.
|
CompletableFuture<Void> |
disableDeduplicationAsync(String topic)
remove deduplication enabled of a topic asynchronously.
|
void |
enableDeduplication(String topic,
boolean enabled)
set deduplication enabled of a topic.
|
CompletableFuture<Void> |
enableDeduplicationAsync(String topic,
boolean enabled)
set deduplication enabled of a topic asynchronously.
|
org.apache.pulsar.client.api.Message<byte[]> |
examineMessage(String topic,
String initialPosition,
long messagePosition)
Examine a specific message on a topic by position relative to the earliest or the latest message.
|
CompletableFuture<org.apache.pulsar.client.api.Message<byte[]>> |
examineMessageAsync(String topic,
String initialPosition,
long messagePosition)
Examine a specific message on a topic by position relative to the earliest or the latest message.
|
void |
expireMessages(String topic,
String subName,
long expireTimeInSeconds)
Expire all messages older than given N (expireTimeInSeconds) seconds for a given subscription.
|
void |
expireMessages(String topic,
String subscriptionName,
org.apache.pulsar.client.api.MessageId messageId,
boolean isExcluded)
Expire all messages older than given N (expireTimeInSeconds) seconds for a given subscription.
|
CompletableFuture<Void> |
expireMessagesAsync(String topic,
String subName,
long expireTimeInSeconds)
Expire all messages older than given N (expireTimeInSeconds) seconds for a given subscription asynchronously.
|
CompletableFuture<Void> |
expireMessagesAsync(String topic,
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.
|
void |
expireMessagesForAllSubscriptions(String topic,
long expireTimeInSeconds)
Expire all messages older than given N seconds for all subscriptions of the persistent-topic.
|
CompletableFuture<Void> |
expireMessagesForAllSubscriptionsAsync(String topic,
long expireTimeInSeconds)
Expire all messages older than given N seconds for all subscriptions of the persistent-topic asynchronously.
|
Map<org.apache.pulsar.common.policies.data.BacklogQuota.BacklogQuotaType,org.apache.pulsar.common.policies.data.BacklogQuota> |
getBacklogQuotaMap(String topic)
Get backlog quota map for a topic.
|
Long |
getCompactionThreshold(String topic)
Get the compactionThreshold for a topic.
|
CompletableFuture<Long> |
getCompactionThresholdAsync(String topic)
Get the compactionThreshold for a topic asynchronously.
|
Boolean |
getDeduplicationEnabled(String topic)
get deduplication enabled of a topic.
|
CompletableFuture<Boolean> |
getDeduplicationEnabledAsync(String topic)
get deduplication enabled of a topic asynchronously.
|
Integer |
getDeduplicationSnapshotInterval(String topic)
Get the deduplication snapshot interval for specified topic.
|
CompletableFuture<Integer> |
getDeduplicationSnapshotIntervalAsync(String topic)
Get the deduplication snapshot interval for specified topic asynchronously.
|
org.apache.pulsar.common.policies.data.DelayedDeliveryPolicies |
getDelayedDeliveryPolicy(String topic)
Get the delayed delivery policy for a specified topic.
|
CompletableFuture<org.apache.pulsar.common.policies.data.DelayedDeliveryPolicies> |
getDelayedDeliveryPolicyAsync(String topic)
Get the delayed delivery policy for a specified topic asynchronously.
|
org.apache.pulsar.common.policies.data.DispatchRate |
getDispatchRate(String topic)
Get message-dispatch-rate (topic can dispatch this many messages per second).
|
CompletableFuture<org.apache.pulsar.common.policies.data.DispatchRate> |
getDispatchRateAsync(String topic)
Get message-dispatch-rate asynchronously.
|
org.apache.pulsar.common.policies.data.InactiveTopicPolicies |
getInactiveTopicPolicies(String topic)
get inactive topic policies of a topic.
|
CompletableFuture<org.apache.pulsar.common.policies.data.InactiveTopicPolicies> |
getInactiveTopicPoliciesAsync(String topic)
get inactive topic policies of a topic asynchronously.
|
com.google.gson.JsonObject |
getInternalInfo(String topic)
Get a JSON representation of the topic metadata stored in ZooKeeper.
|
CompletableFuture<com.google.gson.JsonObject> |
getInternalInfoAsync(String topic)
Get a JSON representation of the topic metadata stored in ZooKeeper.
|
org.apache.pulsar.common.policies.data.PersistentTopicInternalStats |
getInternalStats(String topic)
Get the internal stats for the topic.
|
org.apache.pulsar.common.policies.data.PersistentTopicInternalStats |
getInternalStats(String topic,
boolean metadata)
Get the internal stats for the topic.
|
CompletableFuture<org.apache.pulsar.common.policies.data.PersistentTopicInternalStats> |
getInternalStatsAsync(String topic)
Get the internal stats for the topic asynchronously.
|
CompletableFuture<org.apache.pulsar.common.policies.data.PersistentTopicInternalStats> |
getInternalStatsAsync(String topic,
boolean metadata)
Get the internal stats for the topic asynchronously.
|
org.apache.pulsar.client.api.MessageId |
getLastMessageId(String topic)
Get the last commit message Id of a topic.
|
CompletableFuture<org.apache.pulsar.client.api.MessageId> |
getLastMessageIdAsync(String topic)
Get the last commit message Id of a topic asynchronously.
|
List<String> |
getList(String namespace)
Get the list of topics under a namespace.
|
CompletableFuture<List<String>> |
getListAsync(String namespace)
Get the list of topics under a namespace asynchronously.
|
List<String> |
getListInBundle(String namespace,
String bundleRange)
Get list of topics exist into given bundle.
|
CompletableFuture<List<String>> |
getListInBundleAsync(String namespace,
String bundleRange)
Get list of topics exist into given bundle asynchronously.
|
Integer |
getMaxConsumers(String topic)
Get the max number of consumer for specified topic.
|
CompletableFuture<Integer> |
getMaxConsumersAsync(String topic)
Get the max number of consumer for specified topic asynchronously.
|
Integer |
getMaxConsumersPerSubscription(String topic)
Get the maxConsumersPerSubscription for a topic.
|
CompletableFuture<Integer> |
getMaxConsumersPerSubscriptionAsync(String topic)
Get the maxConsumersPerSubscription for a topic asynchronously.
|
Integer |
getMaxMessageSize(String topic)
Get the max message size for specified topic.
|
CompletableFuture<Integer> |
getMaxMessageSizeAsync(String topic)
Get the max message size for specified topic asynchronously.
|
Integer |
getMaxProducers(String topic)
Get the max number of producer for specified topic.
|
CompletableFuture<Integer> |
getMaxProducersAsync(String topic)
Get the max number of producer for specified topic asynchronously.
|
Integer |
getMaxSubscriptionsPerTopic(String topic)
Get the max number of subscriptions for specified topic.
|
CompletableFuture<Integer> |
getMaxSubscriptionsPerTopicAsync(String topic)
Get the max number of subscriptions for specified topic asynchronously.
|
Integer |
getMaxUnackedMessagesOnConsumer(String topic)
get max unacked messages on consumer of a topic.
|
CompletableFuture<Integer> |
getMaxUnackedMessagesOnConsumerAsync(String topic)
get max unacked messages on consumer of a topic asynchronously.
|
Integer |
getMaxUnackedMessagesOnSubscription(String topic)
get max unacked messages on subscription of a topic.
|
CompletableFuture<Integer> |
getMaxUnackedMessagesOnSubscriptionAsync(String topic)
get max unacked messages on subscription of a topic asynchronously.
|
org.apache.pulsar.client.api.Message<byte[]> |
getMessageById(String topic,
long ledgerId,
long entryId)
Get a message by its messageId via a topic subscription.
|
CompletableFuture<org.apache.pulsar.client.api.Message<byte[]>> |
getMessageByIdAsync(String topic,
long ledgerId,
long entryId)
Get a message by its messageId via a topic subscription asynchronously.
|
int |
getMessageTTL(String topic)
Get message TTL for a topic.
|
org.apache.pulsar.common.policies.data.OffloadPolicies |
getOffloadPolicies(String topic)
get offload policies of a topic.
|
CompletableFuture<org.apache.pulsar.common.policies.data.OffloadPolicies> |
getOffloadPoliciesAsync(String topic)
get offload policies of a topic asynchronously.
|
org.apache.pulsar.common.policies.data.PartitionedTopicInternalStats |
getPartitionedInternalStats(String topic)
Get the stats for the partitioned topic.
|
CompletableFuture<org.apache.pulsar.common.policies.data.PartitionedTopicInternalStats> |
getPartitionedInternalStatsAsync(String topic)
Get the stats-internal for the partitioned topic asynchronously.
|
org.apache.pulsar.common.policies.data.PartitionedTopicStats |
getPartitionedStats(String topic,
boolean perPartition,
boolean getPreciseBacklog,
boolean subscriptionBacklogSize)
Get the stats for the partitioned topic
Response Example:
|
CompletableFuture<org.apache.pulsar.common.policies.data.PartitionedTopicStats> |
getPartitionedStatsAsync(String topic,
boolean perPartition,
boolean getPreciseBacklog,
boolean subscriptionBacklogSize)
Get the stats for the partitioned topic asynchronously.
|
List<String> |
getPartitionedTopicList(String namespace)
Get the list of partitioned topics under a namespace.
|
CompletableFuture<List<String>> |
getPartitionedTopicListAsync(String namespace)
Get the list of partitioned topics under a namespace asynchronously.
|
org.apache.pulsar.common.partition.PartitionedTopicMetadata |
getPartitionedTopicMetadata(String topic)
Get metadata of a partitioned topic.
|
CompletableFuture<org.apache.pulsar.common.partition.PartitionedTopicMetadata> |
getPartitionedTopicMetadataAsync(String topic)
Get metadata of a partitioned topic asynchronously.
|
Map<String,Set<org.apache.pulsar.common.policies.data.AuthAction>> |
getPermissions(String topic)
Get permissions on a topic.
|
CompletableFuture<Map<String,Set<org.apache.pulsar.common.policies.data.AuthAction>>> |
getPermissionsAsync(String topic)
Get permissions on a topic asynchronously.
|
org.apache.pulsar.common.policies.data.PersistencePolicies |
getPersistence(String topic)
Get the configuration of persistence policies for specified topic.
|
CompletableFuture<org.apache.pulsar.common.policies.data.PersistencePolicies> |
getPersistenceAsync(String topic)
Get the configuration of persistence policies for specified topic asynchronously.
|
org.apache.pulsar.common.policies.data.PublishRate |
getPublishRate(String topic)
Get message-publish-rate (topics can publish this many messages per second).
|
CompletableFuture<org.apache.pulsar.common.policies.data.PublishRate> |
getPublishRateAsync(String topic)
Get message-publish-rate (topics can publish this many messages per second) asynchronously.
|
org.apache.pulsar.common.policies.data.RetentionPolicies |
getRetention(String topic)
Get the retention configuration for a topic.
|
CompletableFuture<org.apache.pulsar.common.policies.data.RetentionPolicies> |
getRetentionAsync(String topic)
Get the retention configuration for a topic asynchronously.
|
org.apache.pulsar.common.policies.data.TopicStats |
getStats(String topic,
boolean getPreciseBacklog,
boolean subscriptionBacklogSize)
Get the stats for the topic.
|
CompletableFuture<org.apache.pulsar.common.policies.data.TopicStats> |
getStatsAsync(String topic,
boolean getPreciseBacklog,
boolean subscriptionBacklogSize)
Get the stats for the topic asynchronously.
|
org.apache.pulsar.common.policies.data.SubscribeRate |
getSubscribeRate(String topic)
Get topic-subscribe-rate (topics allow subscribe times per consumer in a period).
|
CompletableFuture<org.apache.pulsar.common.policies.data.SubscribeRate> |
getSubscribeRateAsync(String topic)
Get topic-subscribe-rate asynchronously.
|
org.apache.pulsar.common.policies.data.DispatchRate |
getSubscriptionDispatchRate(String topic)
Get subscription-message-dispatch-rate for the topic.
|
CompletableFuture<org.apache.pulsar.common.policies.data.DispatchRate> |
getSubscriptionDispatchRateAsync(String topic)
Get subscription-message-dispatch-rate asynchronously.
|
List<String> |
getSubscriptions(String topic)
Get the list of subscriptions.
|
CompletableFuture<List<String>> |
getSubscriptionsAsync(String topic)
Get the list of subscriptions asynchronously.
|
void |
grantPermission(String topic,
String role,
Set<org.apache.pulsar.common.policies.data.AuthAction> actions)
Grant permission on a topic.
|
CompletableFuture<Void> |
grantPermissionAsync(String topic,
String role,
Set<org.apache.pulsar.common.policies.data.AuthAction> actions)
Grant permission on a topic asynchronously.
|
OffloadProcessStatus |
offloadStatus(String topic)
Check the status of an ongoing offloading operation for a topic.
|
CompletableFuture<OffloadProcessStatus> |
offloadStatusAsync(String topic)
Check the status of an ongoing offloading operation for a topic asynchronously.
|
List<org.apache.pulsar.client.api.Message<byte[]>> |
peekMessages(String topic,
String subName,
int numMessages)
Peek messages from a topic subscription.
|
CompletableFuture<List<org.apache.pulsar.client.api.Message<byte[]>>> |
peekMessagesAsync(String topic,
String subName,
int numMessages)
Peek messages from a topic subscription asynchronously.
|
void |
removeBacklogQuota(String topic)
Remove a backlog quota policy from a topic.
|
void |
removeCompactionThreshold(String topic)
Remove the compactionThreshold for a topic.
|
CompletableFuture<Void> |
removeCompactionThresholdAsync(String topic)
Remove the compactionThreshold for a topic asynchronously.
|
void |
removeDeduplicationSnapshotInterval(String topic)
Remove the deduplication snapshot interval for specified topic.
|
CompletableFuture<Void> |
removeDeduplicationSnapshotIntervalAsync(String topic)
Remove the deduplication snapshot interval for specified topic asynchronously.
|
void |
removeDelayedDeliveryPolicy(String topic)
Remove the delayed delivery policy for a specified topic.
|
CompletableFuture<Void> |
removeDelayedDeliveryPolicyAsync(String topic)
Remove the delayed delivery policy for a specified topic asynchronously.
|
void |
removeDispatchRate(String topic)
Remove message-dispatch-rate.
|
CompletableFuture<Void> |
removeDispatchRateAsync(String topic)
Remove message-dispatch-rate asynchronously.
|
void |
removeInactiveTopicPolicies(String topic)
remove inactive topic policies of a topic.
|
CompletableFuture<Void> |
removeInactiveTopicPoliciesAsync(String topic)
remove inactive topic policies of a topic asynchronously.
|
void |
removeMaxConsumers(String topic)
Remove the max number of consumer for specified topic.
|
CompletableFuture<Void> |
removeMaxConsumersAsync(String topic)
Remove the max number of consumer for specified topic asynchronously.
|
void |
removeMaxConsumersPerSubscription(String topic)
Remove the maxConsumersPerSubscription for a topic.
|
CompletableFuture<Void> |
removeMaxConsumersPerSubscriptionAsync(String topic)
Remove the maxConsumersPerSubscription for a topic asynchronously.
|
void |
removeMaxMessageSize(String topic)
Remove the max message size for specified topic.
|
CompletableFuture<Void> |
removeMaxMessageSizeAsync(String topic)
Remove the max message size for specified topic asynchronously.
|
void |
removeMaxProducers(String topic)
Remove the max number of producer for specified topic.
|
CompletableFuture<Void> |
removeMaxProducersAsync(String topic)
Remove the max number of producer for specified topic asynchronously.
|
void |
removeMaxSubscriptionsPerTopic(String topic)
Remove the max number of subscriptions for specified topic.
|
CompletableFuture<Void> |
removeMaxSubscriptionsPerTopicAsync(String topic)
Remove the max number of subscriptions for specified topic asynchronously.
|
void |
removeMaxUnackedMessagesOnConsumer(String topic)
remove max unacked messages on consumer of a topic.
|
CompletableFuture<Void> |
removeMaxUnackedMessagesOnConsumerAsync(String topic)
remove max unacked messages on consumer of a topic asynchronously.
|
void |
removeMaxUnackedMessagesOnSubscription(String topic)
remove max unacked messages on subscription of a topic.
|
CompletableFuture<Void> |
removeMaxUnackedMessagesOnSubscriptionAsync(String topic)
remove max unacked messages on subscription of a topic asynchronously.
|
void |
removeMessageTTL(String topic)
Remove message TTL for a topic.
|
void |
removeOffloadPolicies(String topic)
remove offload policies of a topic.
|
CompletableFuture<Void> |
removeOffloadPoliciesAsync(String topic)
remove offload policies of a topic asynchronously.
|
void |
removePersistence(String topic)
Remove the configuration of persistence policies for specified topic.
|
CompletableFuture<Void> |
removePersistenceAsync(String topic)
Remove the configuration of persistence policies for specified topic asynchronously.
|
void |
removePublishRate(String topic)
Remove message-publish-rate.
|
CompletableFuture<Void> |
removePublishRateAsync(String topic)
Remove message-publish-rate asynchronously.
|
void |
removeRetention(String topic)
Remove the retention configuration for all the topics on a topic.
|
CompletableFuture<Void> |
removeRetentionAsync(String topic)
Remove the retention configuration for all the topics on a topic asynchronously.
|
void |
removeSubscribeRate(String topic)
Remove topic-subscribe-rate.
|
CompletableFuture<Void> |
removeSubscribeRateAsync(String topic)
Remove topic-subscribe-rate asynchronously.
|
void |
removeSubscriptionDispatchRate(String topic)
Remove subscription-message-dispatch-rate for a topic.
|
CompletableFuture<Void> |
removeSubscriptionDispatchRateAsync(String topic)
Remove subscription-message-dispatch-rate for a topic asynchronously.
|
void |
resetCursor(String topic,
String subName,
long timestamp)
Reset cursor position on a topic subscription.
|
void |
resetCursor(String topic,
String subName,
org.apache.pulsar.client.api.MessageId messageId)
Reset cursor position on a topic subscription.
|
void |
resetCursor(String topic,
String subName,
org.apache.pulsar.client.api.MessageId messageId,
boolean isExcluded)
Reset cursor position on a topic subscription.
|
CompletableFuture<Void> |
resetCursorAsync(String topic,
String subName,
long timestamp)
Reset cursor position on a topic subscription.
|
CompletableFuture<Void> |
resetCursorAsync(String topic,
String subName,
org.apache.pulsar.client.api.MessageId messageId)
Reset cursor position on a topic subscription.
|
CompletableFuture<Void> |
resetCursorAsync(String topic,
String subName,
org.apache.pulsar.client.api.MessageId messageId,
boolean isExcluded)
Reset cursor position on a topic subscription.
|
void |
revokePermissions(String topic,
String role)
Revoke permissions on a topic.
|
CompletableFuture<Void> |
revokePermissionsAsync(String topic,
String role)
Revoke permissions on a topic asynchronously.
|
void |
setBacklogQuota(String topic,
org.apache.pulsar.common.policies.data.BacklogQuota backlogQuota)
Set a backlog quota for a topic.
|
void |
setCompactionThreshold(String topic,
long compactionThreshold)
Set the compactionThreshold for a topic.
|
CompletableFuture<Void> |
setCompactionThresholdAsync(String topic,
long compactionThreshold)
Set the compactionThreshold for a topic asynchronously.
|
void |
setDeduplicationSnapshotInterval(String topic,
int interval)
Set the deduplication snapshot interval for specified topic.
|
CompletableFuture<Void> |
setDeduplicationSnapshotIntervalAsync(String topic,
int interval)
Set the deduplication snapshot interval for specified topic asynchronously.
|
void |
setDelayedDeliveryPolicy(String topic,
org.apache.pulsar.common.policies.data.DelayedDeliveryPolicies delayedDeliveryPolicies)
Set the delayed delivery policy for a specified topic.
|
CompletableFuture<Void> |
setDelayedDeliveryPolicyAsync(String topic,
org.apache.pulsar.common.policies.data.DelayedDeliveryPolicies delayedDeliveryPolicies)
Set the delayed delivery policy for a specified topic asynchronously.
|
void |
setDispatchRate(String topic,
org.apache.pulsar.common.policies.data.DispatchRate dispatchRate)
Set message-dispatch-rate (topic can dispatch this many messages per second).
|
CompletableFuture<Void> |
setDispatchRateAsync(String topic,
org.apache.pulsar.common.policies.data.DispatchRate dispatchRate)
Set message-dispatch-rate asynchronously.
|
void |
setInactiveTopicPolicies(String topic,
org.apache.pulsar.common.policies.data.InactiveTopicPolicies inactiveTopicPolicies)
set inactive topic policies of a topic.
|
CompletableFuture<Void> |
setInactiveTopicPoliciesAsync(String topic,
org.apache.pulsar.common.policies.data.InactiveTopicPolicies inactiveTopicPolicies)
set inactive topic policies of a topic asynchronously.
|
void |
setMaxConsumers(String topic,
int maxConsumers)
Set the max number of consumer for specified topic.
|
CompletableFuture<Void> |
setMaxConsumersAsync(String topic,
int maxConsumers)
Set the max number of consumer for specified topic asynchronously.
|
void |
setMaxConsumersPerSubscription(String topic,
int maxConsumersPerSubscription)
Set maxConsumersPerSubscription for a topic.
|
CompletableFuture<Void> |
setMaxConsumersPerSubscriptionAsync(String topic,
int maxConsumersPerSubscription)
Set maxConsumersPerSubscription for a topic asynchronously.
|
void |
setMaxMessageSize(String topic,
int maxMessageSize)
Set the max message size for specified topic.
|
CompletableFuture<Void> |
setMaxMessageSizeAsync(String topic,
int maxMessageSize)
Set the max message size for specified topic asynchronously.0 disables.
|
void |
setMaxProducers(String topic,
int maxProducers)
Set the max number of producer for specified topic.
|
CompletableFuture<Void> |
setMaxProducersAsync(String topic,
int maxProducers)
Set the max number of producer for specified topic asynchronously.
|
void |
setMaxSubscriptionsPerTopic(String topic,
int maxSubscriptionsPerTopic)
Set the max number of subscriptions for specified topic.
|
CompletableFuture<Void> |
setMaxSubscriptionsPerTopicAsync(String topic,
int maxSubscriptionsPerTopic)
Set the max number of subscriptions for specified topic asynchronously.
|
void |
setMaxUnackedMessagesOnConsumer(String topic,
int maxNum)
set max unacked messages on consumer of a topic.
|
CompletableFuture<Void> |
setMaxUnackedMessagesOnConsumerAsync(String topic,
int maxNum)
set max unacked messages on consumer of a topic asynchronously.
|
void |
setMaxUnackedMessagesOnSubscription(String topic,
int maxNum)
set max unacked messages on subscription of a topic.
|
CompletableFuture<Void> |
setMaxUnackedMessagesOnSubscriptionAsync(String topic,
int maxNum)
set max unacked messages on subscription of a topic asynchronously.
|
void |
setMessageTTL(String topic,
int messageTTLInSecond)
Set message TTL for a topic.
|
void |
setOffloadPolicies(String topic,
org.apache.pulsar.common.policies.data.OffloadPolicies offloadPolicies)
set offload policies of a topic.
|
CompletableFuture<Void> |
setOffloadPoliciesAsync(String topic,
org.apache.pulsar.common.policies.data.OffloadPolicies offloadPolicies)
set offload policies of a topic asynchronously.
|
void |
setPersistence(String topic,
org.apache.pulsar.common.policies.data.PersistencePolicies persistencePolicies)
Set the configuration of persistence policies for specified topic.
|
CompletableFuture<Void> |
setPersistenceAsync(String topic,
org.apache.pulsar.common.policies.data.PersistencePolicies persistencePolicies)
Set the configuration of persistence policies for specified topic asynchronously.
|
void |
setPublishRate(String topic,
org.apache.pulsar.common.policies.data.PublishRate publishRate)
Set message-publish-rate (topics can publish this many messages per second).
|
CompletableFuture<Void> |
setPublishRateAsync(String topic,
org.apache.pulsar.common.policies.data.PublishRate publishRate)
Set message-publish-rate (topics can publish this many messages per second) asynchronously.
|
void |
setRetention(String topic,
org.apache.pulsar.common.policies.data.RetentionPolicies retention)
Set the retention configuration on a topic.
|
CompletableFuture<Void> |
setRetentionAsync(String topic,
org.apache.pulsar.common.policies.data.RetentionPolicies retention)
Set the retention configuration for all the topics on a topic asynchronously.
|
void |
setSubscribeRate(String topic,
org.apache.pulsar.common.policies.data.SubscribeRate subscribeRate)
Set topic-subscribe-rate (topic will limit by subscribeRate).
|
CompletableFuture<Void> |
setSubscribeRateAsync(String topic,
org.apache.pulsar.common.policies.data.SubscribeRate subscribeRate)
Set topic-subscribe-rate (topics will limit by subscribeRate) asynchronously.
|
void |
setSubscriptionDispatchRate(String topic,
org.apache.pulsar.common.policies.data.DispatchRate dispatchRate)
Set subscription-message-dispatch-rate for the topic.
|
CompletableFuture<Void> |
setSubscriptionDispatchRateAsync(String topic,
org.apache.pulsar.common.policies.data.DispatchRate dispatchRate)
Set subscription-message-dispatch-rate for the topic asynchronously.
|
void |
skipAllMessages(String topic,
String subName)
Skip all messages on a topic subscription.
|
CompletableFuture<Void> |
skipAllMessagesAsync(String topic,
String subName)
Skip all messages on a topic subscription asynchronously.
|
void |
skipMessages(String topic,
String subName,
long numMessages)
Skip messages on a topic subscription.
|
CompletableFuture<Void> |
skipMessagesAsync(String topic,
String subName,
long numMessages)
Skip messages on a topic subscription asynchronously.
|
org.apache.pulsar.client.api.MessageId |
terminateTopic(String topic)
Terminate the topic and prevent any more messages being published on it.
|
CompletableFuture<org.apache.pulsar.client.api.MessageId> |
terminateTopicAsync(String topic)
Terminate the topic and prevent any more messages being published on it.
|
void |
triggerCompaction(String topic)
Trigger compaction to run for a topic.
|
CompletableFuture<Void> |
triggerCompactionAsync(String topic)
Trigger compaction to run for a topic asynchronously.
|
void |
triggerOffload(String topic,
org.apache.pulsar.client.api.MessageId messageId)
Trigger offloading messages in topic to longterm storage.
|
CompletableFuture<Void> |
triggerOffloadAsync(String topic,
org.apache.pulsar.client.api.MessageId messageId)
Trigger offloading messages in topic to longterm storage asynchronously.
|
void |
unload(String topic)
Unload a topic.
|
CompletableFuture<Void> |
unloadAsync(String topic)
Unload a topic asynchronously.
|
void |
updatePartitionedTopic(String topic,
int numPartitions)
Update number of partitions of a non-global partitioned topic.
|
void |
updatePartitionedTopic(String topic,
int numPartitions,
boolean updateLocalTopicOnly)
Update number of partitions of a non-global partitioned topic.
|
CompletableFuture<Void> |
updatePartitionedTopicAsync(String topic,
int numPartitions)
Update number of partitions of a non-global partitioned topic asynchronously.
|
CompletableFuture<Void> |
updatePartitionedTopicAsync(String topic,
int numPartitions,
boolean updateLocalTopicOnly)
Update number of partitions of a non-global partitioned topic asynchronously.
|
asyncDeleteRequest, asyncGetRequest, asyncPostRequest, asyncPutRequest, getApiException, getApiException, request, requestAsyncclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdelete, deleteAsync, deletePartitionedTopic, deletePartitionedTopicAsync, getPartitionedStats, getPartitionedStatsAsync, getStats, getStats, getStatsAsyncpublic TopicsImpl(javax.ws.rs.client.WebTarget web,
org.apache.pulsar.client.api.Authentication auth,
long readTimeoutMs)
public List<String> getList(String namespace) throws PulsarAdminException
Topics
["topic://my-tenant/my-namespace/topic-1",
"topic://my-tenant/my-namespace/topic-2"]
getList in interface Topicsnamespace - Namespace namePulsarAdminException.NotAuthorizedException - Don't have admin permissionPulsarAdminException.NotFoundException - Namespace does not existPulsarAdminException - Unexpected errorpublic CompletableFuture<List<String>> getListAsync(String namespace)
Topics
["topic://my-tenant/my-namespace/topic-1",
"topic://my-tenant/my-namespace/topic-2"]
getListAsync in interface Topicsnamespace - Namespace namepublic List<String> getPartitionedTopicList(String namespace) throws PulsarAdminException
Topics
["persistent://my-tenant/my-namespace/topic-1",
"persistent://my-tenant/my-namespace/topic-2"]
getPartitionedTopicList in interface Topicsnamespace - Namespace namePulsarAdminException.NotAuthorizedException - Don't have admin permissionPulsarAdminException.NotFoundException - Namespace does not existPulsarAdminException - Unexpected errorpublic CompletableFuture<List<String>> getPartitionedTopicListAsync(String namespace)
Topics
["persistent://my-tenant/my-namespace/topic-1",
"persistent://my-tenant/my-namespace/topic-2"]
getPartitionedTopicListAsync in interface Topicsnamespace - Namespace namepublic List<String> getListInBundle(String namespace, String bundleRange) throws PulsarAdminException
TopicsgetListInBundle in interface TopicsPulsarAdminExceptionpublic CompletableFuture<List<String>> getListInBundleAsync(String namespace, String bundleRange)
TopicsgetListInBundleAsync in interface Topicspublic Map<String,Set<org.apache.pulsar.common.policies.data.AuthAction>> getPermissions(String topic) throws PulsarAdminException
Topics
{
"role-1" : [ "produce" ],
"role-2" : [ "consume" ]
}
getPermissions in interface Topicstopic - Topic urlPulsarAdminException.NotAuthorizedException - Don't have admin permissionPulsarAdminException.NotFoundException - Namespace does not existPulsarAdminException - Unexpected errorpublic CompletableFuture<Map<String,Set<org.apache.pulsar.common.policies.data.AuthAction>>> getPermissionsAsync(String topic)
Topics
{
"role-1" : [ "produce" ],
"role-2" : [ "consume" ]
}
getPermissionsAsync in interface Topicstopic - Topic urlpublic void grantPermission(String topic, String role, Set<org.apache.pulsar.common.policies.data.AuthAction> actions) throws PulsarAdminException
Topics
["produce", "consume"]
grantPermission in interface Topicstopic - Topic urlrole - Client role to which grant permissionactions - Auth actions (produce and consume)PulsarAdminException.NotAuthorizedException - Don't have admin permissionPulsarAdminException.NotFoundException - Namespace does not existPulsarAdminException.ConflictException - Concurrent modificationPulsarAdminException - Unexpected errorpublic CompletableFuture<Void> grantPermissionAsync(String topic, String role, Set<org.apache.pulsar.common.policies.data.AuthAction> actions)
Topics
["produce", "consume"]
grantPermissionAsync in interface Topicstopic - Topic urlrole - Client role to which grant permissionactions - Auth actions (produce and consume)public void revokePermissions(String topic, String role) throws PulsarAdminException
TopicsrevokePermissions in interface Topicstopic - Topic urlrole - Client role to which remove permissionPulsarAdminException.NotAuthorizedException - Don't have admin permissionPulsarAdminException.NotFoundException - Namespace does not existPulsarAdminException.PreconditionFailedException - Permissions are not set at the topic levelPulsarAdminException - Unexpected errorpublic CompletableFuture<Void> revokePermissionsAsync(String topic, String role)
TopicsrevokePermissionsAsync in interface Topicstopic - Topic urlrole - Client role to which remove permissionpublic void createPartitionedTopic(String topic, int numPartitions) throws PulsarAdminException
TopicscreatePartitionedTopic in interface Topicstopic - Topic namenumPartitions - Number of partitions to create of the topicPulsarAdminExceptionpublic void createNonPartitionedTopic(String topic) throws PulsarAdminException
TopicscreateNonPartitionedTopic in interface Topicstopic - Topic namePulsarAdminExceptionpublic void createMissedPartitions(String topic) throws PulsarAdminException
TopicscreateMissedPartitions in interface Topicstopic - partitioned topic namePulsarAdminExceptionpublic CompletableFuture<Void> createNonPartitionedTopicAsync(String topic)
TopicscreateNonPartitionedTopicAsync in interface Topicstopic - Topic namepublic CompletableFuture<Void> createPartitionedTopicAsync(String topic, int numPartitions)
TopicscreatePartitionedTopicAsync in interface Topicstopic - Topic namenumPartitions - Number of partitions to create of the topicpublic CompletableFuture<Void> createMissedPartitionsAsync(String topic)
TopicscreateMissedPartitionsAsync in interface Topicstopic - partitioned topic namepublic void updatePartitionedTopic(String topic, int numPartitions) throws PulsarAdminException
TopicsupdatePartitionedTopic in interface Topicstopic - Topic namenumPartitions - Number of new partitions of already exist partitioned-topicPulsarAdminExceptionpublic CompletableFuture<Void> updatePartitionedTopicAsync(String topic, int numPartitions)
TopicsupdatePartitionedTopicAsync in interface Topicstopic - Topic namenumPartitions - Number of new partitions of already exist partitioned-topicpublic void updatePartitionedTopic(String topic, int numPartitions, boolean updateLocalTopicOnly) throws PulsarAdminException
TopicsupdatePartitionedTopic in interface Topicstopic - Topic namenumPartitions - Number of new partitions of already exist partitioned-topicupdateLocalTopicOnly - Used by broker for global topic with multiple replicated clustersPulsarAdminExceptionpublic CompletableFuture<Void> updatePartitionedTopicAsync(String topic, int numPartitions, boolean updateLocalTopicOnly)
TopicsupdatePartitionedTopicAsync in interface Topicstopic - Topic namenumPartitions - Number of new partitions of already exist partitioned-topicupdateLocalTopicOnly - Used by broker for global topic with multiple replicated clusterspublic org.apache.pulsar.common.partition.PartitionedTopicMetadata getPartitionedTopicMetadata(String topic) throws PulsarAdminException
TopicsgetPartitionedTopicMetadata in interface Topicstopic - Topic namePulsarAdminExceptionpublic CompletableFuture<org.apache.pulsar.common.partition.PartitionedTopicMetadata> getPartitionedTopicMetadataAsync(String topic)
TopicsgetPartitionedTopicMetadataAsync in interface Topicstopic - Topic namepublic void deletePartitionedTopic(String topic) throws PulsarAdminException
TopicsdeletePartitionedTopic in interface Topicstopic - Topic namePulsarAdminExceptionpublic CompletableFuture<Void> deletePartitionedTopicAsync(String topic)
TopicsdeletePartitionedTopicAsync in interface Topicstopic - Topic namepublic void deletePartitionedTopic(String topic, boolean force, boolean deleteSchema) throws PulsarAdminException
TopicsdeletePartitionedTopic in interface Topicstopic - Topic nameforce - Delete topic forcefullydeleteSchema - Delete topic's schema storagePulsarAdminExceptionpublic CompletableFuture<Void> deletePartitionedTopicAsync(String topic, boolean force, boolean deleteSchema)
TopicsdeletePartitionedTopicAsync in interface Topicstopic - Topic nameforce - Delete topic forcefullydeleteSchema - Delete topic's schema storagepublic void delete(String topic) throws PulsarAdminException
Topicsdelete in interface Topicstopic - Topic namePulsarAdminException.NotAuthorizedException - Don't have admin permissionPulsarAdminException.NotFoundException - Topic does not existPulsarAdminException.PreconditionFailedException - Topic has active subscriptions or producersPulsarAdminException - Unexpected errorpublic CompletableFuture<Void> deleteAsync(String topic)
TopicsdeleteAsync in interface Topicstopic - Topic namepublic void delete(String topic, boolean force, boolean deleteSchema) throws PulsarAdminException
Topicsdelete in interface Topicstopic - Topic nameforce - Delete topic forcefullydeleteSchema - Delete topic's schema storagePulsarAdminException.NotAuthorizedException - Don't have admin permissionPulsarAdminException.NotFoundException - Topic does not existPulsarAdminException.PreconditionFailedException - Topic has active subscriptions or producersPulsarAdminException - Unexpected errorpublic CompletableFuture<Void> deleteAsync(String topic, boolean force, boolean deleteSchema)
TopicsdeleteAsync in interface Topicstopic - topic nameforce - Delete topic forcefullydeleteSchema - Delete topic's schema storagepublic void unload(String topic) throws PulsarAdminException
Topicsunload in interface Topicstopic - topic namePulsarAdminException.NotAuthorizedException - Don't have admin permissionPulsarAdminException.NotFoundException - topic does not existPulsarAdminException - Unexpected errorpublic CompletableFuture<Void> unloadAsync(String topic)
TopicsunloadAsync in interface Topicstopic - topic namepublic org.apache.pulsar.client.api.MessageId terminateTopic(String topic) throws PulsarAdminException
TopicsterminateTopic in interface Topicstopic - topic namePulsarAdminException.NotAuthorizedException - Don't have admin permissionPulsarAdminException.NotFoundException - topic does not existPulsarAdminException - Unexpected errorpublic CompletableFuture<org.apache.pulsar.client.api.MessageId> terminateTopicAsync(String topic)
TopicsterminateTopicAsync in interface Topicstopic - topic namepublic List<String> getSubscriptions(String topic) throws PulsarAdminException
TopicsgetSubscriptions in interface Topicstopic - topic namePulsarAdminException.NotAuthorizedException - Don't have admin permissionPulsarAdminException.NotFoundException - Topic does not existPulsarAdminException - Unexpected errorpublic CompletableFuture<List<String>> getSubscriptionsAsync(String topic)
TopicsgetSubscriptionsAsync in interface Topicstopic - topic namepublic org.apache.pulsar.common.policies.data.TopicStats getStats(String topic, boolean getPreciseBacklog, boolean subscriptionBacklogSize) throws PulsarAdminException
Topics
{
"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.
getStats in interface Topicstopic - topic namegetPreciseBacklog - Set to true to get precise backlog, Otherwise get imprecise backlog.subscriptionBacklogSize - Whether to get backlog size for each subscription.PulsarAdminException.NotAuthorizedException - Don't have admin permissionPulsarAdminException.NotFoundException - Topic does not existPulsarAdminException - Unexpected errorpublic CompletableFuture<org.apache.pulsar.common.policies.data.TopicStats> getStatsAsync(String topic, boolean getPreciseBacklog, boolean subscriptionBacklogSize)
TopicsgetStatsAsync in interface Topicstopic - topic namegetPreciseBacklog - Set to true to get precise backlog, Otherwise get imprecise backlog.subscriptionBacklogSize - Whether to get backlog size for each subscription.public org.apache.pulsar.common.policies.data.PersistentTopicInternalStats getInternalStats(String topic) throws PulsarAdminException
TopicsgetInternalStats in interface Topicstopic - topic namePulsarAdminException.NotAuthorizedException - Don't have admin permissionPulsarAdminException.NotFoundException - Topic does not existPulsarAdminException - Unexpected errorpublic org.apache.pulsar.common.policies.data.PersistentTopicInternalStats getInternalStats(String topic, boolean metadata) throws PulsarAdminException
TopicsgetInternalStats in interface Topicstopic - topic namemetadata - flag to include ledger metadataPulsarAdminException.NotAuthorizedException - Don't have admin permissionPulsarAdminException.NotFoundException - Topic does not existPulsarAdminException - Unexpected errorpublic CompletableFuture<org.apache.pulsar.common.policies.data.PersistentTopicInternalStats> getInternalStatsAsync(String topic)
TopicsgetInternalStatsAsync in interface Topicstopic - topic Namepublic CompletableFuture<org.apache.pulsar.common.policies.data.PersistentTopicInternalStats> getInternalStatsAsync(String topic, boolean metadata)
TopicsgetInternalStatsAsync in interface Topicstopic - topic Namemetadata - flag to include ledger metadatapublic com.google.gson.JsonObject getInternalInfo(String topic) throws PulsarAdminException
TopicsgetInternalInfo in interface Topicstopic - topic namePulsarAdminException.NotAuthorizedException - Don't have admin permissionPulsarAdminException.NotFoundException - Topic does not existPulsarAdminException - Unexpected errorpublic CompletableFuture<com.google.gson.JsonObject> getInternalInfoAsync(String topic)
TopicsgetInternalInfoAsync in interface Topicstopic - topic namepublic org.apache.pulsar.common.policies.data.PartitionedTopicStats getPartitionedStats(String topic, boolean perPartition, boolean getPreciseBacklog, boolean subscriptionBacklogSize) throws PulsarAdminException
Topics
{
"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.
getPartitionedStats in interface Topicstopic - 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.PulsarAdminException.NotAuthorizedException - Don't have admin permissionPulsarAdminException.NotFoundException - Topic does not existPulsarAdminException - Unexpected errorpublic CompletableFuture<org.apache.pulsar.common.policies.data.PartitionedTopicStats> getPartitionedStatsAsync(String topic, boolean perPartition, boolean getPreciseBacklog, boolean subscriptionBacklogSize)
TopicsgetPartitionedStatsAsync in interface Topicstopic - 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.public org.apache.pulsar.common.policies.data.PartitionedTopicInternalStats getPartitionedInternalStats(String topic) throws PulsarAdminException
TopicsgetPartitionedInternalStats in interface Topicstopic - topic namePulsarAdminExceptionpublic CompletableFuture<org.apache.pulsar.common.policies.data.PartitionedTopicInternalStats> getPartitionedInternalStatsAsync(String topic)
TopicsgetPartitionedInternalStatsAsync in interface Topicstopic - topic Namepublic void deleteSubscription(String topic, String subName) throws PulsarAdminException
TopicsdeleteSubscription in interface Topicstopic - topic namesubName - Subscription namePulsarAdminException.NotAuthorizedException - Don't have admin permissionPulsarAdminException.NotFoundException - Topic or subscription does not existPulsarAdminException.PreconditionFailedException - Subscription has active consumersPulsarAdminException - Unexpected errorpublic void deleteSubscription(String topic, String subName, boolean force) throws PulsarAdminException
TopicsdeleteSubscription in interface Topicstopic - topic namesubName - Subscription nameforce - Delete topic forcefullyPulsarAdminException.NotAuthorizedException - Don't have admin permissionPulsarAdminException.NotFoundException - Topic or subscription does not existPulsarAdminException.PreconditionFailedException - Subscription has active consumersPulsarAdminException - Unexpected errorpublic CompletableFuture<Void> deleteSubscriptionAsync(String topic, String subName)
TopicsdeleteSubscriptionAsync in interface Topicstopic - topic namesubName - Subscription namepublic CompletableFuture<Void> deleteSubscriptionAsync(String topic, String subName, boolean force)
TopicsdeleteSubscriptionAsync in interface Topicstopic - topic namesubName - Subscription nameforce - Delete topic forcefullypublic void skipAllMessages(String topic, String subName) throws PulsarAdminException
TopicsskipAllMessages in interface Topicstopic - topic namesubName - Subscription namePulsarAdminException.NotAuthorizedException - Don't have admin permissionPulsarAdminException.NotFoundException - Topic or subscription does not existPulsarAdminException - Unexpected errorpublic CompletableFuture<Void> skipAllMessagesAsync(String topic, String subName)
TopicsskipAllMessagesAsync in interface Topicstopic - topic namesubName - Subscription namepublic void skipMessages(String topic, String subName, long numMessages) throws PulsarAdminException
TopicsskipMessages in interface Topicstopic - topic namesubName - Subscription namenumMessages - Number of messagesPulsarAdminException.NotAuthorizedException - Don't have admin permissionPulsarAdminException.NotFoundException - Topic or subscription does not existPulsarAdminException - Unexpected errorpublic CompletableFuture<Void> skipMessagesAsync(String topic, String subName, long numMessages)
TopicsskipMessagesAsync in interface Topicstopic - topic namesubName - Subscription namenumMessages - Number of messagespublic void expireMessages(String topic, String subName, long expireTimeInSeconds) throws PulsarAdminException
TopicsexpireMessages in interface Topicstopic - topic namesubName - Subscription nameexpireTimeInSeconds - Expire messages older than time in secondsPulsarAdminException - Unexpected errorpublic CompletableFuture<Void> expireMessagesAsync(String topic, String subName, long expireTimeInSeconds)
TopicsexpireMessagesAsync in interface Topicstopic - topic namesubName - Subscription nameexpireTimeInSeconds - Expire messages older than time in secondspublic void expireMessages(String topic, String subscriptionName, org.apache.pulsar.client.api.MessageId messageId, boolean isExcluded) throws PulsarAdminException
TopicsexpireMessages in interface Topicstopic - topic namesubscriptionName - Subscription namemessageId - Position before which all messages will be expired.isExcluded - Will message at passed in position also be expired.PulsarAdminException - Unexpected errorpublic CompletableFuture<Void> expireMessagesAsync(String topic, String subscriptionName, org.apache.pulsar.client.api.MessageId messageId, boolean isExcluded)
TopicsexpireMessagesAsync in interface Topicstopic - topic namesubscriptionName - Subscription namemessageId - Position before which all messages will be expired.isExcluded - Will message at passed in position also be expired.CompletableFuture that'll be completed when expire message is done.public void expireMessagesForAllSubscriptions(String topic, long expireTimeInSeconds) throws PulsarAdminException
TopicsexpireMessagesForAllSubscriptions in interface Topicstopic - topic nameexpireTimeInSeconds - Expire messages older than time in secondsPulsarAdminException - Unexpected errorpublic CompletableFuture<Void> expireMessagesForAllSubscriptionsAsync(String topic, long expireTimeInSeconds)
TopicsexpireMessagesForAllSubscriptionsAsync in interface Topicstopic - topic nameexpireTimeInSeconds - Expire messages older than time in secondspublic List<org.apache.pulsar.client.api.Message<byte[]>> peekMessages(String topic, String subName, int numMessages) throws PulsarAdminException
TopicspeekMessages in interface Topicstopic - topic namesubName - Subscription namenumMessages - Number of messagesPulsarAdminException.NotAuthorizedException - Don't have admin permissionPulsarAdminException.NotFoundException - Topic or subscription does not existPulsarAdminException - Unexpected errorpublic CompletableFuture<List<org.apache.pulsar.client.api.Message<byte[]>>> peekMessagesAsync(String topic, String subName, int numMessages)
TopicspeekMessagesAsync in interface Topicstopic - topic namesubName - Subscription namenumMessages - Number of messagespublic org.apache.pulsar.client.api.Message<byte[]> examineMessage(String topic, String initialPosition, long messagePosition) throws PulsarAdminException
TopicsexamineMessage in interface Topicstopic - Topic nameinitialPosition - Relative start position to examine message. It can be 'latest' or 'earliest'messagePosition - The position of messages (default 1)PulsarAdminExceptionpublic CompletableFuture<org.apache.pulsar.client.api.Message<byte[]>> examineMessageAsync(String topic, String initialPosition, long messagePosition)
TopicsexamineMessageAsync in interface Topicstopic - Topic nameinitialPosition - Relative start position to examine message. It can be 'latest' or 'earliest'messagePosition - The position of messages (default 1)public CompletableFuture<org.apache.pulsar.client.api.Message<byte[]>> getMessageByIdAsync(String topic, long ledgerId, long entryId)
TopicsgetMessageByIdAsync in interface Topicstopic - Topic nameledgerId - Ledger identryId - Entry idpublic org.apache.pulsar.client.api.Message<byte[]> getMessageById(String topic, long ledgerId, long entryId) throws PulsarAdminException
TopicsgetMessageById in interface Topicstopic - Topic nameledgerId - Ledger identryId - Entry idPulsarAdminException - Unexpected errorpublic void createSubscription(String topic, String subscriptionName, org.apache.pulsar.client.api.MessageId messageId) throws PulsarAdminException
TopicscreateSubscription in interface Topicstopic - topic namesubscriptionName - Subscription namemessageId - The MessageId on where to initialize the subscription. It could be MessageId.latest,
MessageId.earliest or a specific message id.PulsarAdminException.NotAuthorizedException - Don't have admin permissionPulsarAdminException.ConflictException - Subscription already existsPulsarAdminException.NotAllowedException - Command disallowed for requested resourcePulsarAdminException - Unexpected errorpublic CompletableFuture<Void> createSubscriptionAsync(String topic, String subscriptionName, org.apache.pulsar.client.api.MessageId messageId)
TopicscreateSubscriptionAsync in interface Topicstopic - topic namesubscriptionName - Subscription namemessageId - The MessageId on where to initialize the subscription. It could be MessageId.latest,
MessageId.earliest or a specific message id.public void resetCursor(String topic, String subName, long timestamp) throws PulsarAdminException
TopicsresetCursor in interface Topicstopic - topic namesubName - Subscription nametimestamp - reset subscription to position closest to time in ms since epochPulsarAdminException.NotAuthorizedException - Don't have admin permissionPulsarAdminException.NotFoundException - Topic or subscription does not existPulsarAdminException.NotAllowedException - Command disallowed for requested resourcePulsarAdminException - Unexpected errorpublic CompletableFuture<Void> resetCursorAsync(String topic, String subName, long timestamp)
TopicsresetCursorAsync in interface Topicstopic - topic namesubName - Subscription nametimestamp - reset subscription to position closest to time in ms since epochpublic void resetCursor(String topic, String subName, org.apache.pulsar.client.api.MessageId messageId) throws PulsarAdminException
TopicsresetCursor in interface Topicstopic - topic namesubName - Subscription namemessageId - reset subscription to messageId (or previous nearest messageId if given messageId is not valid)PulsarAdminException.NotAuthorizedException - Don't have admin permissionPulsarAdminException.NotFoundException - Topic or subscription does not existPulsarAdminException.NotAllowedException - Command disallowed for requested resourcePulsarAdminException - Unexpected errorpublic void resetCursor(String topic, String subName, org.apache.pulsar.client.api.MessageId messageId, boolean isExcluded) throws PulsarAdminException
TopicsresetCursor in interface TopicsPulsarAdminExceptionpublic CompletableFuture<Void> resetCursorAsync(String topic, String subName, org.apache.pulsar.client.api.MessageId messageId)
TopicsresetCursorAsync in interface Topicstopic - topic namesubName - Subscription namemessageId - reset subscription to messageId (or previous nearest messageId if given messageId is not valid)public CompletableFuture<Void> resetCursorAsync(String topic, String subName, org.apache.pulsar.client.api.MessageId messageId, boolean isExcluded)
TopicsresetCursorAsync in interface Topicspublic void triggerCompaction(String topic) throws PulsarAdminException
TopicstriggerCompaction in interface Topicstopic - The topic on which to trigger compactionPulsarAdminExceptionpublic CompletableFuture<Void> triggerCompactionAsync(String topic)
TopicstriggerCompactionAsync in interface Topicstopic - The topic on which to trigger compactionpublic LongRunningProcessStatus compactionStatus(String topic) throws PulsarAdminException
TopicscompactionStatus in interface Topicstopic - The topic whose compaction status we wish to checkPulsarAdminExceptionpublic CompletableFuture<LongRunningProcessStatus> compactionStatusAsync(String topic)
TopicscompactionStatusAsync in interface Topicstopic - The topic whose compaction status we wish to checkpublic void triggerOffload(String topic, org.apache.pulsar.client.api.MessageId messageId) throws PulsarAdminException
TopicstriggerOffload in interface Topicstopic - the topic to offloadmessageId - ID of maximum message which should be offloadedPulsarAdminExceptionpublic CompletableFuture<Void> triggerOffloadAsync(String topic, org.apache.pulsar.client.api.MessageId messageId)
TopicstriggerOffloadAsync in interface Topicstopic - the topic to offloadmessageId - ID of maximum message which should be offloadedpublic OffloadProcessStatus offloadStatus(String topic) throws PulsarAdminException
TopicsoffloadStatus in interface Topicstopic - the topic being offloadedPulsarAdminExceptionpublic CompletableFuture<OffloadProcessStatus> offloadStatusAsync(String topic)
TopicsoffloadStatusAsync in interface Topicstopic - the topic being offloadedpublic org.apache.pulsar.client.api.MessageId getLastMessageId(String topic) throws PulsarAdminException
TopicsgetLastMessageId in interface Topicstopic - the topic namePulsarAdminExceptionpublic CompletableFuture<org.apache.pulsar.client.api.MessageId> getLastMessageIdAsync(String topic)
TopicsgetLastMessageIdAsync in interface Topicstopic - the topic namepublic Map<org.apache.pulsar.common.policies.data.BacklogQuota.BacklogQuotaType,org.apache.pulsar.common.policies.data.BacklogQuota> getBacklogQuotaMap(String topic) throws PulsarAdminException
Topics
{
"namespace_memory" : {
"limit" : "134217728",
"policy" : "consumer_backlog_eviction"
},
"destination_storage" : {
"limit" : "-1",
"policy" : "producer_exception"
}
}
getBacklogQuotaMap in interface Topicstopic - Topic namePulsarAdminException.NotAuthorizedException - Permission deniedPulsarAdminException.NotFoundException - Topic does not existPulsarAdminException - Unexpected errorpublic void setBacklogQuota(String topic, org.apache.pulsar.common.policies.data.BacklogQuota backlogQuota) throws PulsarAdminException
TopicsRequest parameter example:
{
"limit" : "134217728",
"policy" : "consumer_backlog_eviction"
}
setBacklogQuota in interface Topicstopic - Topic namebacklogQuota - the new BacklogQuotaPulsarAdminException.NotAuthorizedException - Don't have admin permissionPulsarAdminException.NotFoundException - Topic does not existPulsarAdminException - Unexpected errorpublic void removeBacklogQuota(String topic) throws PulsarAdminException
TopicsremoveBacklogQuota in interface Topicstopic - Topic namePulsarAdminException.NotAuthorizedException - Don't have admin permissionPulsarAdminException.NotFoundException - Topic does not existPulsarAdminException - Unexpected errorpublic Integer getMaxUnackedMessagesOnConsumer(String topic) throws PulsarAdminException
TopicsgetMaxUnackedMessagesOnConsumer in interface TopicsPulsarAdminExceptionpublic CompletableFuture<Integer> getMaxUnackedMessagesOnConsumerAsync(String topic)
TopicsgetMaxUnackedMessagesOnConsumerAsync in interface Topicspublic CompletableFuture<Void> setMaxUnackedMessagesOnConsumerAsync(String topic, int maxNum)
TopicssetMaxUnackedMessagesOnConsumerAsync in interface Topicspublic void setMaxUnackedMessagesOnConsumer(String topic, int maxNum) throws PulsarAdminException
TopicssetMaxUnackedMessagesOnConsumer in interface TopicsPulsarAdminExceptionpublic CompletableFuture<Void> removeMaxUnackedMessagesOnConsumerAsync(String topic)
TopicsremoveMaxUnackedMessagesOnConsumerAsync in interface Topicspublic void removeMaxUnackedMessagesOnConsumer(String topic) throws PulsarAdminException
TopicsremoveMaxUnackedMessagesOnConsumer in interface TopicsPulsarAdminExceptionpublic org.apache.pulsar.common.policies.data.InactiveTopicPolicies getInactiveTopicPolicies(String topic) throws PulsarAdminException
TopicsgetInactiveTopicPolicies in interface TopicsPulsarAdminExceptionpublic CompletableFuture<org.apache.pulsar.common.policies.data.InactiveTopicPolicies> getInactiveTopicPoliciesAsync(String topic)
TopicsgetInactiveTopicPoliciesAsync in interface Topicspublic CompletableFuture<Void> setInactiveTopicPoliciesAsync(String topic, org.apache.pulsar.common.policies.data.InactiveTopicPolicies inactiveTopicPolicies)
TopicssetInactiveTopicPoliciesAsync in interface Topicspublic void setInactiveTopicPolicies(String topic, org.apache.pulsar.common.policies.data.InactiveTopicPolicies inactiveTopicPolicies) throws PulsarAdminException
TopicssetInactiveTopicPolicies in interface TopicsPulsarAdminExceptionpublic CompletableFuture<Void> removeInactiveTopicPoliciesAsync(String topic)
TopicsremoveInactiveTopicPoliciesAsync in interface Topicspublic void removeInactiveTopicPolicies(String topic) throws PulsarAdminException
TopicsremoveInactiveTopicPolicies in interface TopicsPulsarAdminExceptionpublic org.apache.pulsar.common.policies.data.DelayedDeliveryPolicies getDelayedDeliveryPolicy(String topic) throws PulsarAdminException
TopicsgetDelayedDeliveryPolicy in interface TopicsPulsarAdminExceptionpublic CompletableFuture<org.apache.pulsar.common.policies.data.DelayedDeliveryPolicies> getDelayedDeliveryPolicyAsync(String topic)
TopicsgetDelayedDeliveryPolicyAsync in interface Topicspublic CompletableFuture<Void> removeDelayedDeliveryPolicyAsync(String topic)
TopicsremoveDelayedDeliveryPolicyAsync in interface Topicspublic void removeDelayedDeliveryPolicy(String topic) throws PulsarAdminException
TopicsremoveDelayedDeliveryPolicy in interface TopicsPulsarAdminExceptionpublic CompletableFuture<Void> setDelayedDeliveryPolicyAsync(String topic, org.apache.pulsar.common.policies.data.DelayedDeliveryPolicies delayedDeliveryPolicies)
TopicssetDelayedDeliveryPolicyAsync in interface Topicspublic void setDelayedDeliveryPolicy(String topic, org.apache.pulsar.common.policies.data.DelayedDeliveryPolicies delayedDeliveryPolicies) throws PulsarAdminException
TopicssetDelayedDeliveryPolicy in interface TopicsPulsarAdminExceptionpublic Boolean getDeduplicationEnabled(String topic) throws PulsarAdminException
TopicsgetDeduplicationEnabled in interface TopicsPulsarAdminExceptionpublic CompletableFuture<Boolean> getDeduplicationEnabledAsync(String topic)
TopicsgetDeduplicationEnabledAsync in interface Topicspublic void enableDeduplication(String topic, boolean enabled) throws PulsarAdminException
TopicsenableDeduplication in interface TopicsPulsarAdminExceptionpublic CompletableFuture<Void> enableDeduplicationAsync(String topic, boolean enabled)
TopicsenableDeduplicationAsync in interface Topicspublic void disableDeduplication(String topic) throws PulsarAdminException
TopicsdisableDeduplication in interface TopicsPulsarAdminExceptionpublic CompletableFuture<Void> disableDeduplicationAsync(String topic)
TopicsdisableDeduplicationAsync in interface Topicspublic org.apache.pulsar.common.policies.data.OffloadPolicies getOffloadPolicies(String topic) throws PulsarAdminException
TopicsgetOffloadPolicies in interface TopicsPulsarAdminExceptionpublic CompletableFuture<org.apache.pulsar.common.policies.data.OffloadPolicies> getOffloadPoliciesAsync(String topic)
TopicsgetOffloadPoliciesAsync in interface Topicspublic void setOffloadPolicies(String topic, org.apache.pulsar.common.policies.data.OffloadPolicies offloadPolicies) throws PulsarAdminException
TopicssetOffloadPolicies in interface TopicsPulsarAdminExceptionpublic CompletableFuture<Void> setOffloadPoliciesAsync(String topic, org.apache.pulsar.common.policies.data.OffloadPolicies offloadPolicies)
TopicssetOffloadPoliciesAsync in interface Topicspublic void removeOffloadPolicies(String topic) throws PulsarAdminException
TopicsremoveOffloadPolicies in interface TopicsPulsarAdminExceptionpublic CompletableFuture<Void> removeOffloadPoliciesAsync(String topic)
TopicsremoveOffloadPoliciesAsync in interface Topicspublic Integer getMaxUnackedMessagesOnSubscription(String topic) throws PulsarAdminException
TopicsgetMaxUnackedMessagesOnSubscription in interface TopicsPulsarAdminExceptionpublic CompletableFuture<Integer> getMaxUnackedMessagesOnSubscriptionAsync(String topic)
TopicsgetMaxUnackedMessagesOnSubscriptionAsync in interface Topicspublic void setMaxUnackedMessagesOnSubscription(String topic, int maxNum) throws PulsarAdminException
TopicssetMaxUnackedMessagesOnSubscription in interface TopicsPulsarAdminExceptionpublic CompletableFuture<Void> setMaxUnackedMessagesOnSubscriptionAsync(String topic, int maxNum)
TopicssetMaxUnackedMessagesOnSubscriptionAsync in interface Topicspublic void removeMaxUnackedMessagesOnSubscription(String topic) throws PulsarAdminException
TopicsremoveMaxUnackedMessagesOnSubscription in interface TopicsPulsarAdminExceptionpublic CompletableFuture<Void> removeMaxUnackedMessagesOnSubscriptionAsync(String topic)
TopicsremoveMaxUnackedMessagesOnSubscriptionAsync in interface Topicspublic void setMessageTTL(String topic, int messageTTLInSecond) throws PulsarAdminException
TopicssetMessageTTL in interface Topicstopic - Topic namemessageTTLInSecond - Message TTL in second.PulsarAdminException.NotAuthorizedException - Don't have admin permissionPulsarAdminException.NotFoundException - Topic does not existPulsarAdminException - Unexpected errorpublic int getMessageTTL(String topic) throws PulsarAdminException
TopicsgetMessageTTL in interface TopicsPulsarAdminException.NotAuthorizedException - Don't have admin permissionPulsarAdminException.NotFoundException - Topic does not existPulsarAdminException - Unexpected errorpublic void removeMessageTTL(String topic) throws PulsarAdminException
TopicsremoveMessageTTL in interface TopicsPulsarAdminException.NotAuthorizedException - Don't have admin permissionPulsarAdminException.NotFoundException - Topic does not existPulsarAdminException - Unexpected errorpublic void setRetention(String topic, org.apache.pulsar.common.policies.data.RetentionPolicies retention) throws PulsarAdminException
Topics
{
"retentionTimeInMinutes" : 60, // how long to retain messages
"retentionSizeInMB" : 1024, // retention backlog limit
}
setRetention in interface Topicstopic - Topic namePulsarAdminException.NotAuthorizedException - Don't have admin permissionPulsarAdminException.NotFoundException - Topic does not existPulsarAdminException.ConflictException - Concurrent modificationPulsarAdminException - Unexpected errorpublic CompletableFuture<Void> setRetentionAsync(String topic, org.apache.pulsar.common.policies.data.RetentionPolicies retention)
Topics
{
"retentionTimeInMinutes" : 60, // how long to retain messages
"retentionSizeInMB" : 1024, // retention backlog limit
}
setRetentionAsync in interface Topicstopic - Topic namepublic org.apache.pulsar.common.policies.data.RetentionPolicies getRetention(String topic) throws PulsarAdminException
Topics
{
"retentionTimeInMinutes" : 60, // how long to retain messages
"retentionSizeInMB" : 1024, // retention backlog limit
}
getRetention in interface Topicstopic - Topic namePulsarAdminException.NotAuthorizedException - Don't have admin permissionPulsarAdminException.NotFoundException - Topic does not existPulsarAdminException.ConflictException - Concurrent modificationPulsarAdminException - Unexpected errorpublic CompletableFuture<org.apache.pulsar.common.policies.data.RetentionPolicies> getRetentionAsync(String topic)
TopicsgetRetentionAsync in interface Topicstopic - Topic namepublic void removeRetention(String topic) throws PulsarAdminException
TopicsremoveRetention in interface Topicstopic - Topic namePulsarAdminException.NotAuthorizedException - Don't have admin permissionPulsarAdminException.NotFoundException - Topic does not existPulsarAdminException.ConflictException - Concurrent modificationPulsarAdminException - Unexpected errorpublic CompletableFuture<Void> removeRetentionAsync(String topic)
Topics
{
"retentionTimeInMinutes" : 60, // how long to retain messages
"retentionSizeInMB" : 1024, // retention backlog limit
}
removeRetentionAsync in interface Topicstopic - Topic namepublic void setPersistence(String topic, org.apache.pulsar.common.policies.data.PersistencePolicies persistencePolicies) throws PulsarAdminException
TopicssetPersistence in interface Topicstopic - Topic namepersistencePolicies - Configuration of bookkeeper persistence policiesPulsarAdminException - Unexpected errorpublic CompletableFuture<Void> setPersistenceAsync(String topic, org.apache.pulsar.common.policies.data.PersistencePolicies persistencePolicies)
TopicssetPersistenceAsync in interface Topicstopic - Topic namepersistencePolicies - Configuration of bookkeeper persistence policiespublic org.apache.pulsar.common.policies.data.PersistencePolicies getPersistence(String topic) throws PulsarAdminException
TopicsgetPersistence in interface Topicstopic - Topic namePulsarAdminException - Unexpected errorpublic CompletableFuture<org.apache.pulsar.common.policies.data.PersistencePolicies> getPersistenceAsync(String topic)
TopicsgetPersistenceAsync in interface Topicstopic - Topic namepublic void removePersistence(String topic) throws PulsarAdminException
TopicsremovePersistence in interface Topicstopic - Topic namePulsarAdminException - Unexpected errorpublic CompletableFuture<Void> removePersistenceAsync(String topic)
TopicsremovePersistenceAsync in interface Topicstopic - Topic namepublic org.apache.pulsar.common.policies.data.DispatchRate getDispatchRate(String topic) throws PulsarAdminException
TopicsgetDispatchRate in interface TopicsPulsarAdminException - Unexpected errorpublic CompletableFuture<org.apache.pulsar.common.policies.data.DispatchRate> getDispatchRateAsync(String topic)
TopicsgetDispatchRateAsync in interface Topicspublic void setDispatchRate(String topic, org.apache.pulsar.common.policies.data.DispatchRate dispatchRate) throws PulsarAdminException
TopicssetDispatchRate in interface TopicsdispatchRate - number of messages per secondPulsarAdminException - Unexpected errorpublic CompletableFuture<Void> setDispatchRateAsync(String topic, org.apache.pulsar.common.policies.data.DispatchRate dispatchRate)
TopicssetDispatchRateAsync in interface TopicsdispatchRate - number of messages per secondpublic void removeDispatchRate(String topic) throws PulsarAdminException
TopicsremoveDispatchRate in interface TopicsPulsarAdminException - unexpected errorpublic CompletableFuture<Void> removeDispatchRateAsync(String topic)
TopicsremoveDispatchRateAsync in interface Topicspublic org.apache.pulsar.common.policies.data.DispatchRate getSubscriptionDispatchRate(String topic) throws PulsarAdminException
TopicsgetSubscriptionDispatchRate in interface TopicsPulsarAdminException - Unexpected errorpublic CompletableFuture<org.apache.pulsar.common.policies.data.DispatchRate> getSubscriptionDispatchRateAsync(String topic)
TopicsgetSubscriptionDispatchRateAsync in interface Topicspublic void setSubscriptionDispatchRate(String topic, org.apache.pulsar.common.policies.data.DispatchRate dispatchRate) throws PulsarAdminException
TopicssetSubscriptionDispatchRate in interface TopicsdispatchRate - number of messages per secondPulsarAdminException - Unexpected errorpublic CompletableFuture<Void> setSubscriptionDispatchRateAsync(String topic, org.apache.pulsar.common.policies.data.DispatchRate dispatchRate)
TopicssetSubscriptionDispatchRateAsync in interface TopicsdispatchRate - number of messages per secondpublic void removeSubscriptionDispatchRate(String topic) throws PulsarAdminException
TopicsremoveSubscriptionDispatchRate in interface Topicstopic - Topic namePulsarAdminException - Unexpected errorpublic CompletableFuture<Void> removeSubscriptionDispatchRateAsync(String topic)
TopicsremoveSubscriptionDispatchRateAsync in interface Topicstopic - Topic namepublic Long getCompactionThreshold(String topic) throws PulsarAdminException
Topics
10000000
getCompactionThreshold in interface Topicstopic - Topic namePulsarAdminException.NotAuthorizedException - Don't have admin permissionPulsarAdminException.NotFoundException - Namespace does not existPulsarAdminException - Unexpected errorpublic CompletableFuture<Long> getCompactionThresholdAsync(String topic)
Topics
10000000
getCompactionThresholdAsync in interface Topicstopic - Topic namepublic void setCompactionThreshold(String topic, long compactionThreshold) throws PulsarAdminException
Topics
10000000
setCompactionThreshold in interface Topicstopic - Topic namecompactionThreshold - maximum number of backlog bytes before compaction is triggeredPulsarAdminException.NotAuthorizedException - Don't have admin permissionPulsarAdminException.NotFoundException - Namespace does not existPulsarAdminException - Unexpected errorpublic CompletableFuture<Void> setCompactionThresholdAsync(String topic, long compactionThreshold)
Topics
10000000
setCompactionThresholdAsync in interface Topicstopic - Topic namecompactionThreshold - maximum number of backlog bytes before compaction is triggeredpublic void removeCompactionThreshold(String topic) throws PulsarAdminException
TopicsremoveCompactionThreshold in interface Topicstopic - Topic namePulsarAdminException - Unexpected errorpublic CompletableFuture<Void> removeCompactionThresholdAsync(String topic)
TopicsremoveCompactionThresholdAsync in interface Topicstopic - Topic namepublic org.apache.pulsar.common.policies.data.PublishRate getPublishRate(String topic) throws PulsarAdminException
TopicsgetPublishRate in interface TopicsPulsarAdminException - Unexpected errorpublic CompletableFuture<org.apache.pulsar.common.policies.data.PublishRate> getPublishRateAsync(String topic)
TopicsgetPublishRateAsync in interface Topicspublic void setPublishRate(String topic, org.apache.pulsar.common.policies.data.PublishRate publishRate) throws PulsarAdminException
TopicssetPublishRate in interface TopicspublishRate - number of messages per secondPulsarAdminException - Unexpected errorpublic CompletableFuture<Void> setPublishRateAsync(String topic, org.apache.pulsar.common.policies.data.PublishRate publishRate)
TopicssetPublishRateAsync in interface TopicspublishRate - number of messages per secondpublic void removePublishRate(String topic) throws PulsarAdminException
TopicsremovePublishRate in interface TopicsPulsarAdminException - unexpected errorpublic CompletableFuture<Void> removePublishRateAsync(String topic)
TopicsremovePublishRateAsync in interface Topicspublic Integer getMaxConsumersPerSubscription(String topic) throws PulsarAdminException
Topics
0
getMaxConsumersPerSubscription in interface Topicstopic - Topic namePulsarAdminException.NotAuthorizedException - Don't have admin permissionPulsarAdminException.NotFoundException - Namespace does not existPulsarAdminException - Unexpected errorpublic CompletableFuture<Integer> getMaxConsumersPerSubscriptionAsync(String topic)
Topics
0
getMaxConsumersPerSubscriptionAsync in interface Topicstopic - Topic namepublic void setMaxConsumersPerSubscription(String topic, int maxConsumersPerSubscription) throws PulsarAdminException
Topics
10
setMaxConsumersPerSubscription in interface Topicstopic - Topic namemaxConsumersPerSubscription - maxConsumersPerSubscription value for a namespacePulsarAdminException.NotAuthorizedException - Don't have admin permissionPulsarAdminException.NotFoundException - Namespace does not existPulsarAdminException - Unexpected errorpublic CompletableFuture<Void> setMaxConsumersPerSubscriptionAsync(String topic, int maxConsumersPerSubscription)
Topics
10
setMaxConsumersPerSubscriptionAsync in interface Topicstopic - Topic namemaxConsumersPerSubscription - maxConsumersPerSubscription value for a namespacepublic void removeMaxConsumersPerSubscription(String topic) throws PulsarAdminException
TopicsremoveMaxConsumersPerSubscription in interface Topicstopic - Topic namePulsarAdminException - Unexpected errorpublic CompletableFuture<Void> removeMaxConsumersPerSubscriptionAsync(String topic)
TopicsremoveMaxConsumersPerSubscriptionAsync in interface Topicstopic - Topic namepublic Integer getMaxProducers(String topic) throws PulsarAdminException
TopicsgetMaxProducers in interface Topicstopic - Topic namePulsarAdminException - Unexpected errorpublic CompletableFuture<Integer> getMaxProducersAsync(String topic)
TopicsgetMaxProducersAsync in interface Topicstopic - Topic namepublic void setMaxProducers(String topic, int maxProducers) throws PulsarAdminException
TopicssetMaxProducers in interface Topicstopic - Topic namemaxProducers - Max number of producerPulsarAdminException - Unexpected errorpublic CompletableFuture<Void> setMaxProducersAsync(String topic, int maxProducers)
TopicssetMaxProducersAsync in interface Topicstopic - Topic namemaxProducers - Max number of producerpublic void removeMaxProducers(String topic) throws PulsarAdminException
TopicsremoveMaxProducers in interface Topicstopic - Topic namePulsarAdminException - Unexpected errorpublic CompletableFuture<Void> removeMaxProducersAsync(String topic)
TopicsremoveMaxProducersAsync in interface Topicstopic - Topic namepublic Integer getMaxSubscriptionsPerTopic(String topic) throws PulsarAdminException
TopicsgetMaxSubscriptionsPerTopic in interface Topicstopic - Topic namePulsarAdminException - Unexpected errorpublic CompletableFuture<Integer> getMaxSubscriptionsPerTopicAsync(String topic)
TopicsgetMaxSubscriptionsPerTopicAsync in interface Topicstopic - Topic namepublic void setMaxSubscriptionsPerTopic(String topic, int maxSubscriptionsPerTopic) throws PulsarAdminException
TopicssetMaxSubscriptionsPerTopic in interface Topicstopic - Topic namemaxSubscriptionsPerTopic - Max number of subscriptionsPulsarAdminException - Unexpected errorpublic CompletableFuture<Void> setMaxSubscriptionsPerTopicAsync(String topic, int maxSubscriptionsPerTopic)
TopicssetMaxSubscriptionsPerTopicAsync in interface Topicstopic - Topic namemaxSubscriptionsPerTopic - Max number of subscriptionspublic void removeMaxSubscriptionsPerTopic(String topic) throws PulsarAdminException
TopicsremoveMaxSubscriptionsPerTopic in interface Topicstopic - Topic namePulsarAdminException - Unexpected errorpublic CompletableFuture<Void> removeMaxSubscriptionsPerTopicAsync(String topic)
TopicsremoveMaxSubscriptionsPerTopicAsync in interface Topicstopic - Topic namepublic Integer getMaxMessageSize(String topic) throws PulsarAdminException
TopicsgetMaxMessageSize in interface Topicstopic - Topic namePulsarAdminException - Unexpected errorpublic CompletableFuture<Integer> getMaxMessageSizeAsync(String topic)
TopicsgetMaxMessageSizeAsync in interface Topicstopic - Topic namepublic void setMaxMessageSize(String topic, int maxMessageSize) throws PulsarAdminException
TopicssetMaxMessageSize in interface Topicstopic - Topic namemaxMessageSize - Max message size of producerPulsarAdminException - Unexpected errorpublic CompletableFuture<Void> setMaxMessageSizeAsync(String topic, int maxMessageSize)
TopicssetMaxMessageSizeAsync in interface Topicstopic - Topic namemaxMessageSize - Max message size of topicpublic void removeMaxMessageSize(String topic) throws PulsarAdminException
TopicsremoveMaxMessageSize in interface Topicstopic - Topic namePulsarAdminException - Unexpected errorpublic CompletableFuture<Void> removeMaxMessageSizeAsync(String topic)
TopicsremoveMaxMessageSizeAsync in interface Topicstopic - Topic namepublic Integer getMaxConsumers(String topic) throws PulsarAdminException
TopicsgetMaxConsumers in interface Topicstopic - Topic namePulsarAdminException - Unexpected errorpublic CompletableFuture<Integer> getMaxConsumersAsync(String topic)
TopicsgetMaxConsumersAsync in interface Topicstopic - Topic namepublic void setMaxConsumers(String topic, int maxConsumers) throws PulsarAdminException
TopicssetMaxConsumers in interface Topicstopic - Topic namemaxConsumers - Max number of consumerPulsarAdminException - Unexpected errorpublic CompletableFuture<Void> setMaxConsumersAsync(String topic, int maxConsumers)
TopicssetMaxConsumersAsync in interface Topicstopic - Topic namemaxConsumers - Max number of consumerpublic void removeMaxConsumers(String topic) throws PulsarAdminException
TopicsremoveMaxConsumers in interface Topicstopic - Topic namePulsarAdminException - Unexpected errorpublic CompletableFuture<Void> removeMaxConsumersAsync(String topic)
TopicsremoveMaxConsumersAsync in interface Topicstopic - Topic namepublic Integer getDeduplicationSnapshotInterval(String topic) throws PulsarAdminException
TopicsgetDeduplicationSnapshotInterval in interface TopicsPulsarAdminExceptionpublic CompletableFuture<Integer> getDeduplicationSnapshotIntervalAsync(String topic)
TopicsgetDeduplicationSnapshotIntervalAsync in interface Topicspublic void setDeduplicationSnapshotInterval(String topic, int interval) throws PulsarAdminException
TopicssetDeduplicationSnapshotInterval in interface TopicsPulsarAdminExceptionpublic CompletableFuture<Void> setDeduplicationSnapshotIntervalAsync(String topic, int interval)
TopicssetDeduplicationSnapshotIntervalAsync in interface Topicspublic void removeDeduplicationSnapshotInterval(String topic) throws PulsarAdminException
TopicsremoveDeduplicationSnapshotInterval in interface TopicsPulsarAdminExceptionpublic CompletableFuture<Void> removeDeduplicationSnapshotIntervalAsync(String topic)
TopicsremoveDeduplicationSnapshotIntervalAsync in interface Topicspublic org.apache.pulsar.common.policies.data.SubscribeRate getSubscribeRate(String topic) throws PulsarAdminException
TopicsgetSubscribeRate in interface TopicsPulsarAdminException - Unexpected errorpublic CompletableFuture<org.apache.pulsar.common.policies.data.SubscribeRate> getSubscribeRateAsync(String topic)
TopicsgetSubscribeRateAsync in interface Topicspublic void setSubscribeRate(String topic, org.apache.pulsar.common.policies.data.SubscribeRate subscribeRate) throws PulsarAdminException
TopicssetSubscribeRate in interface TopicssubscribeRate - consumer subscribe limit by this subscribeRatePulsarAdminException - Unexpected errorpublic CompletableFuture<Void> setSubscribeRateAsync(String topic, org.apache.pulsar.common.policies.data.SubscribeRate subscribeRate)
TopicssetSubscribeRateAsync in interface TopicssubscribeRate - consumer subscribe limit by this subscribeRatepublic void removeSubscribeRate(String topic) throws PulsarAdminException
TopicsremoveSubscribeRate in interface TopicsPulsarAdminException - unexpected errorpublic CompletableFuture<Void> removeSubscribeRateAsync(String topic)
TopicsremoveSubscribeRateAsync in interface TopicsCopyright © 2017–2021 Apache Software Foundation. All rights reserved.