接口 TopicPolicies


  • public interface TopicPolicies
    Admin interface for topic policies management.
    • 方法详细资料

      • getDelayedDeliveryPolicyAsync

        java.util.concurrent.CompletableFuture<DelayedDeliveryPolicies> getDelayedDeliveryPolicyAsync​(java.lang.String topic,
                                                                                                      boolean applied)
        Get the delayed delivery policy applied for a specified topic asynchronously.
        参数:
        topic -
        applied -
        返回:
      • getDelayedDeliveryPolicyAsync

        java.util.concurrent.CompletableFuture<DelayedDeliveryPolicies> getDelayedDeliveryPolicyAsync​(java.lang.String topic)
        Get the delayed delivery policy for a specified topic asynchronously.
        参数:
        topic -
        返回:
      • 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.
        参数:
        topic -
        delayedDeliveryPolicies -
        返回:
      • removeDelayedDeliveryPolicyAsync

        java.util.concurrent.CompletableFuture<java.lang.Void> removeDelayedDeliveryPolicyAsync​(java.lang.String topic)
        Remove the delayed delivery policy for a specified topic asynchronously.
        参数:
        topic -
        返回:
      • removeDelayedDeliveryPolicy

        void removeDelayedDeliveryPolicy​(java.lang.String topic)
                                  throws PulsarAdminException
        Remove the delayed delivery policy for a specified topic.
        参数:
        topic -
        抛出:
        PulsarAdminException
      • getMessageTTL

        java.lang.Integer getMessageTTL​(java.lang.String topic,
                                        boolean applied)
                                 throws PulsarAdminException
        Get message TTL applied for a topic.
        参数:
        topic -
        返回:
        抛出:
        PulsarAdminException
      • setRetention

        void setRetention​(java.lang.String topic,
                          RetentionPolicies retention)
                   throws PulsarAdminException
        Set 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
         }
         
         
        参数:
        topic - Topic name
        抛出:
        NotAuthorizedException - Don't have admin permission
        PulsarAdminException.NotFoundException - Topic does not exist
        ConflictException - Concurrent modification
        PulsarAdminException - 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
         }
         
         
        参数:
        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
         }
         
         
        参数:
        topic - Topic name
        抛出:
        NotAuthorizedException - Don't have admin permission
        PulsarAdminException.NotFoundException - Topic does not exist
        ConflictException - Concurrent modification
        PulsarAdminException - 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.

        参数:
        topic - Topic name
      • getRetentionAsync

        java.util.concurrent.CompletableFuture<RetentionPolicies> getRetentionAsync​(java.lang.String topic,
                                                                                    boolean applied)
        Get the applied retention configuration for a topic asynchronously.
        参数:
        topic -
        applied -
        返回:
      • removeRetention

        void removeRetention​(java.lang.String topic)
                      throws PulsarAdminException
        Remove 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:

        参数:
        topic - Topic name
        抛出:
        NotAuthorizedException - Don't have admin permission
        PulsarAdminException.NotFoundException - Topic does not exist
        ConflictException - Concurrent modification
        PulsarAdminException - 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
         }
         
         
        参数:
        topic - Topic name
      • getMaxUnackedMessagesOnConsumer

        java.lang.Integer getMaxUnackedMessagesOnConsumer​(java.lang.String topic)
                                                   throws PulsarAdminException
        Get max unacked messages on a consumer of a topic.
        参数:
        topic -
        返回:
        抛出:
        PulsarAdminException
      • getMaxUnackedMessagesOnConsumerAsync

        java.util.concurrent.CompletableFuture<java.lang.Integer> getMaxUnackedMessagesOnConsumerAsync​(java.lang.String topic)
        get max unacked messages on consumer of a topic asynchronously.
        参数:
        topic -
        返回:
      • getMaxUnackedMessagesOnConsumer

        java.lang.Integer getMaxUnackedMessagesOnConsumer​(java.lang.String topic,
                                                          boolean applied)
                                                   throws PulsarAdminException
        get applied max unacked messages on consumer of a topic.
        参数:
        topic -
        applied -
        返回:
        抛出:
        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.
        参数:
        topic -
        applied -
        返回:
      • setMaxUnackedMessagesOnConsumer

        void setMaxUnackedMessagesOnConsumer​(java.lang.String topic,
                                             int maxNum)
                                      throws PulsarAdminException
        set max unacked messages on consumer of a topic.
        参数:
        topic -
        maxNum -
        抛出:
        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.
        参数:
        topic -
        maxNum -
        返回:
      • removeMaxUnackedMessagesOnConsumer

        void removeMaxUnackedMessagesOnConsumer​(java.lang.String topic)
                                         throws PulsarAdminException
        remove max unacked messages on consumer of a topic.
        参数:
        topic -
        抛出:
        PulsarAdminException
      • removeMaxUnackedMessagesOnConsumerAsync

        java.util.concurrent.CompletableFuture<java.lang.Void> removeMaxUnackedMessagesOnConsumerAsync​(java.lang.String topic)
        remove max unacked messages on consumer of a topic asynchronously.
        参数:
        topic -
        返回:
      • getInactiveTopicPoliciesAsync

        java.util.concurrent.CompletableFuture<InactiveTopicPolicies> getInactiveTopicPoliciesAsync​(java.lang.String topic,
                                                                                                    boolean applied)
        Get inactive topic policies applied for a topic asynchronously.
        参数:
        topic -
        applied -
        返回:
      • getInactiveTopicPoliciesAsync

        java.util.concurrent.CompletableFuture<InactiveTopicPolicies> getInactiveTopicPoliciesAsync​(java.lang.String topic)
        get inactive topic policies of a topic asynchronously.
        参数:
        topic -
        返回:
      • setInactiveTopicPoliciesAsync

        java.util.concurrent.CompletableFuture<java.lang.Void> setInactiveTopicPoliciesAsync​(java.lang.String topic,
                                                                                             InactiveTopicPolicies inactiveTopicPolicies)
        set inactive topic policies of a topic asynchronously.
        参数:
        topic -
        inactiveTopicPolicies -
        返回:
      • removeInactiveTopicPolicies

        void removeInactiveTopicPolicies​(java.lang.String topic)
                                  throws PulsarAdminException
        remove inactive topic policies of a topic.
        参数:
        topic -
        抛出:
        PulsarAdminException
      • removeInactiveTopicPoliciesAsync

        java.util.concurrent.CompletableFuture<java.lang.Void> removeInactiveTopicPoliciesAsync​(java.lang.String topic)
        remove inactive topic policies of a topic asynchronously.
        参数:
        topic -
        返回:
      • getOffloadPoliciesAsync

        java.util.concurrent.CompletableFuture<OffloadPolicies> getOffloadPoliciesAsync​(java.lang.String topic)
        get offload policies of a topic asynchronously.
        参数:
        topic -
        返回:
      • getOffloadPoliciesAsync

        java.util.concurrent.CompletableFuture<OffloadPolicies> getOffloadPoliciesAsync​(java.lang.String topic,
                                                                                        boolean applied)
        get applied offload policies of a topic asynchronously.
        参数:
        topic -
        返回:
      • setOffloadPoliciesAsync

        java.util.concurrent.CompletableFuture<java.lang.Void> setOffloadPoliciesAsync​(java.lang.String topic,
                                                                                       OffloadPolicies offloadPolicies)
        set offload policies of a topic asynchronously.
        参数:
        topic -
        offloadPolicies -
        返回:
      • removeOffloadPoliciesAsync

        java.util.concurrent.CompletableFuture<java.lang.Void> removeOffloadPoliciesAsync​(java.lang.String topic)
        remove offload policies of a topic asynchronously.
        参数:
        topic -
        返回:
      • getMaxUnackedMessagesOnSubscription

        java.lang.Integer getMaxUnackedMessagesOnSubscription​(java.lang.String topic)
                                                       throws PulsarAdminException
        get max unacked messages on subscription of a topic.
        参数:
        topic -
        返回:
        抛出:
        PulsarAdminException
      • getMaxUnackedMessagesOnSubscriptionAsync

        java.util.concurrent.CompletableFuture<java.lang.Integer> getMaxUnackedMessagesOnSubscriptionAsync​(java.lang.String topic)
        get max unacked messages on subscription of a topic asynchronously.
        参数:
        topic -
        返回:
      • getMaxUnackedMessagesOnSubscription

        java.lang.Integer getMaxUnackedMessagesOnSubscription​(java.lang.String topic,
                                                              boolean applied)
                                                       throws PulsarAdminException
        get max unacked messages on subscription of a topic.
        参数:
        topic -
        返回:
        抛出:
        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.
        参数:
        topic -
        返回:
      • setMaxUnackedMessagesOnSubscription

        void setMaxUnackedMessagesOnSubscription​(java.lang.String topic,
                                                 int maxNum)
                                          throws PulsarAdminException
        set max unacked messages on subscription of a topic.
        参数:
        topic -
        maxNum -
        抛出:
        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.
        参数:
        topic -
        maxNum -
        返回:
      • removeMaxUnackedMessagesOnSubscription

        void removeMaxUnackedMessagesOnSubscription​(java.lang.String topic)
                                             throws PulsarAdminException
        remove max unacked messages on subscription of a topic.
        参数:
        topic -
        抛出:
        PulsarAdminException
      • removeMaxUnackedMessagesOnSubscriptionAsync

        java.util.concurrent.CompletableFuture<java.lang.Void> removeMaxUnackedMessagesOnSubscriptionAsync​(java.lang.String topic)
        remove max unacked messages on subscription of a topic asynchronously.
        参数:
        topic -
        返回:
      • setPersistence

        void setPersistence​(java.lang.String topic,
                            PersistencePolicies persistencePolicies)
                     throws PulsarAdminException
        Set the configuration of persistence policies for specified topic.
        参数:
        topic - Topic name
        persistencePolicies - Configuration of bookkeeper persistence policies
        抛出:
        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.
        参数:
        topic - Topic name
        persistencePolicies - Configuration of bookkeeper persistence policies
      • getPersistence

        PersistencePolicies getPersistence​(java.lang.String topic)
                                    throws PulsarAdminException
        Get the configuration of persistence policies for specified topic.
        参数:
        topic - Topic name
        返回:
        Configuration of bookkeeper persistence policies
        抛出:
        PulsarAdminException - Unexpected error
      • getPersistenceAsync

        java.util.concurrent.CompletableFuture<PersistencePolicies> getPersistenceAsync​(java.lang.String topic)
        Get the configuration of persistence policies for specified topic asynchronously.
        参数:
        topic - Topic name
      • getPersistence

        PersistencePolicies getPersistence​(java.lang.String topic,
                                           boolean applied)
                                    throws PulsarAdminException
        Get the applied configuration of persistence policies for specified topic.
        参数:
        topic - Topic name
        返回:
        Configuration of bookkeeper persistence policies
        抛出:
        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.
        参数:
        topic - Topic name
      • removePersistence

        void removePersistence​(java.lang.String topic)
                        throws PulsarAdminException
        Remove the configuration of persistence policies for specified topic.
        参数:
        topic - Topic name
        抛出:
        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.
        参数:
        topic - Topic name
      • getDeduplicationStatus

        java.lang.Boolean getDeduplicationStatus​(java.lang.String topic)
                                          throws PulsarAdminException
        get deduplication enabled of a topic.
        参数:
        topic -
        返回:
        抛出:
        PulsarAdminException
      • getDeduplicationStatusAsync

        java.util.concurrent.CompletableFuture<java.lang.Boolean> getDeduplicationStatusAsync​(java.lang.String topic)
        get deduplication enabled of a topic asynchronously.
        参数:
        topic -
        返回:
      • getDeduplicationStatus

        java.lang.Boolean getDeduplicationStatus​(java.lang.String topic,
                                                 boolean applied)
                                          throws PulsarAdminException
        get applied deduplication enabled of a topic.
        参数:
        topic -
        返回:
        抛出:
        PulsarAdminException
      • getDeduplicationStatusAsync

        java.util.concurrent.CompletableFuture<java.lang.Boolean> getDeduplicationStatusAsync​(java.lang.String topic,
                                                                                              boolean applied)
        get applied deduplication enabled of a topic asynchronously.
        参数:
        topic -
        返回:
      • setDeduplicationStatus

        void setDeduplicationStatus​(java.lang.String topic,
                                    boolean enabled)
                             throws PulsarAdminException
        set deduplication enabled of a topic.
        参数:
        topic -
        enabled -
        抛出:
        PulsarAdminException
      • setDeduplicationStatusAsync

        java.util.concurrent.CompletableFuture<java.lang.Void> setDeduplicationStatusAsync​(java.lang.String topic,
                                                                                           boolean enabled)
        set deduplication enabled of a topic asynchronously.
        参数:
        topic -
        enabled -
        返回:
      • removeDeduplicationStatus

        void removeDeduplicationStatus​(java.lang.String topic)
                                throws PulsarAdminException
        remove deduplication enabled of a topic.
        参数:
        topic -
        抛出:
        PulsarAdminException
      • removeDeduplicationStatusAsync

        java.util.concurrent.CompletableFuture<java.lang.Void> removeDeduplicationStatusAsync​(java.lang.String topic)
        remove deduplication enabled of a topic asynchronously.
        参数:
        topic -
        返回:
      • setDispatchRate

        void setDispatchRate​(java.lang.String topic,
                             DispatchRate dispatchRate)
                      throws PulsarAdminException
        Set message-dispatch-rate (topic can dispatch this many messages per second).
        参数:
        topic -
        dispatchRate - number of messages per second
        抛出:
        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

        参数:
        topic -
        dispatchRate - number of messages per second
      • getDispatchRateAsync

        java.util.concurrent.CompletableFuture<DispatchRate> getDispatchRateAsync​(java.lang.String topic)
        Get message-dispatch-rate asynchronously.

        Topic can dispatch this many messages per second.

        参数:
        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).
        参数:
        topic -
        抛出:
        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.

        参数:
        topic -
      • removeDispatchRate

        void removeDispatchRate​(java.lang.String topic)
                         throws PulsarAdminException
        Remove message-dispatch-rate.

        Remove topic message dispatch rate

        参数:
        topic -
        抛出:
        PulsarAdminException - unexpected error
      • removeDispatchRateAsync

        java.util.concurrent.CompletableFuture<java.lang.Void> removeDispatchRateAsync​(java.lang.String topic)
                                                                                throws PulsarAdminException
        Remove message-dispatch-rate asynchronously.

        Remove topic message dispatch rate

        参数:
        topic -
        抛出:
        PulsarAdminException - unexpected error
      • setSubscriptionDispatchRate

        void setSubscriptionDispatchRate​(java.lang.String topic,
                                         DispatchRate dispatchRate)
                                  throws PulsarAdminException
        Set subscription-message-dispatch-rate for the topic.

        Subscriptions under this namespace can dispatch this many messages per second

        参数:
        topic -
        dispatchRate - number of messages per second
        抛出:
        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.

        参数:
        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.

        参数:
        namespace -
        抛出:
        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.

        参数:
        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.

        参数:
        topic -
        抛出:
        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.

        参数:
        topic -
      • removeSubscriptionDispatchRate

        void removeSubscriptionDispatchRate​(java.lang.String topic)
                                     throws PulsarAdminException
        Remove subscription-message-dispatch-rate for a topic.
        参数:
        topic - Topic name
        抛出:
        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.
        参数:
        topic - Topic name
      • setReplicatorDispatchRate

        void setReplicatorDispatchRate​(java.lang.String topic,
                                       DispatchRate dispatchRate)
                                throws PulsarAdminException
        Set replicatorDispatchRate for the topic.

        Replicator dispatch rate under this topic can dispatch this many messages per second

        参数:
        topic -
        dispatchRate - number of messages per second
        抛出:
        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.

        参数:
        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.

        参数:
        topic -
        抛出:
        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.

        参数:
        topic -
      • getReplicatorDispatchRateAsync

        java.util.concurrent.CompletableFuture<DispatchRate> getReplicatorDispatchRateAsync​(java.lang.String topic,
                                                                                            boolean applied)
        Get applied replicatorDispatchRate asynchronously.
        参数:
        topic -
        applied -
        返回:
      • removeReplicatorDispatchRate

        void removeReplicatorDispatchRate​(java.lang.String topic)
                                   throws PulsarAdminException
        Remove replicatorDispatchRate for a topic.
        参数:
        topic - Topic name
        抛出:
        PulsarAdminException - Unexpected error
      • removeReplicatorDispatchRateAsync

        java.util.concurrent.CompletableFuture<java.lang.Void> removeReplicatorDispatchRateAsync​(java.lang.String topic)
        Remove replicatorDispatchRate for a topic asynchronously.
        参数:
        topic - Topic name
      • getCompactionThreshold

        java.lang.Long getCompactionThreshold​(java.lang.String topic)
                                       throws PulsarAdminException
        Get the compactionThreshold for a topic. The maximum number of bytes can have before compaction is triggered. 0 disables.

        Response example:

         10000000
         
        参数:
        topic - Topic name
        抛出:
        NotAuthorizedException - Don't have admin permission
        PulsarAdminException.NotFoundException - Namespace does not exist
        PulsarAdminException - 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
         
        参数:
        topic - Topic name
      • getCompactionThreshold

        java.lang.Long getCompactionThreshold​(java.lang.String topic,
                                              boolean applied)
                                       throws PulsarAdminException
        Get the compactionThreshold for a topic. The maximum number of bytes can have before compaction is triggered. 0 disables.
        参数:
        topic - Topic name
        抛出:
        NotAuthorizedException - Don't have admin permission
        PulsarAdminException.NotFoundException - Namespace does not exist
        PulsarAdminException - 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.
        参数:
        topic - Topic name
      • setCompactionThreshold

        void setCompactionThreshold​(java.lang.String topic,
                                    long compactionThreshold)
                             throws PulsarAdminException
        Set the compactionThreshold for a topic. The maximum number of bytes can have before compaction is triggered. 0 disables.

        Request example:

         10000000
         
        参数:
        topic - Topic name
        compactionThreshold - maximum number of backlog bytes before compaction is triggered
        抛出:
        NotAuthorizedException - Don't have admin permission
        PulsarAdminException.NotFoundException - Namespace does not exist
        PulsarAdminException - 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
         
        参数:
        topic - Topic name
        compactionThreshold - maximum number of backlog bytes before compaction is triggered
      • removeCompactionThreshold

        void removeCompactionThreshold​(java.lang.String topic)
                                throws PulsarAdminException
        Remove the compactionThreshold for a topic.
        参数:
        topic - Topic name
        抛出:
        PulsarAdminException - Unexpected error
      • removeCompactionThresholdAsync

        java.util.concurrent.CompletableFuture<java.lang.Void> removeCompactionThresholdAsync​(java.lang.String topic)
        Remove the compactionThreshold for a topic asynchronously.
        参数:
        topic - Topic name
      • setPublishRate

        void setPublishRate​(java.lang.String topic,
                            PublishRate publishMsgRate)
                     throws PulsarAdminException
        Set message-publish-rate (topics can publish this many messages per second).
        参数:
        topic -
        publishMsgRate - number of messages per second
        抛出:
        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.
        参数:
        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).
        参数:
        topic -
        返回:
        number of messages per second
        抛出:
        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.
        参数:
        topic -
        返回:
        number of messages per second
      • removePublishRate

        void removePublishRate​(java.lang.String topic)
                        throws PulsarAdminException
        Remove message-publish-rate.

        Remove topic message publish rate

        参数:
        topic -
        抛出:
        PulsarAdminException - unexpected error
      • removePublishRateAsync

        java.util.concurrent.CompletableFuture<java.lang.Void> removePublishRateAsync​(java.lang.String topic)
                                                                               throws PulsarAdminException
        Remove message-publish-rate asynchronously.

        Remove topic message publish rate

        参数:
        topic -
        抛出:
        PulsarAdminException - unexpected error
      • getMaxConsumersPerSubscription

        java.lang.Integer getMaxConsumersPerSubscription​(java.lang.String topic)
                                                  throws PulsarAdminException
        Get the maxConsumersPerSubscription for a topic.

        Response example:

         0
         
        参数:
        topic - Topic name
        抛出:
        NotAuthorizedException - Don't have admin permission
        PulsarAdminException.NotFoundException - Namespace does not exist
        PulsarAdminException - 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
         
        参数:
        topic - Topic name
      • setMaxConsumersPerSubscription

        void setMaxConsumersPerSubscription​(java.lang.String topic,
                                            int maxConsumersPerSubscription)
                                     throws PulsarAdminException
        Set maxConsumersPerSubscription for a topic.

        Request example:

         10
         
        参数:
        topic - Topic name
        maxConsumersPerSubscription - maxConsumersPerSubscription value for a namespace
        抛出:
        NotAuthorizedException - Don't have admin permission
        PulsarAdminException.NotFoundException - Namespace does not exist
        PulsarAdminException - 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
         
        参数:
        topic - Topic name
        maxConsumersPerSubscription - maxConsumersPerSubscription value for a namespace
      • removeMaxConsumersPerSubscription

        void removeMaxConsumersPerSubscription​(java.lang.String topic)
                                        throws PulsarAdminException
        Remove the maxConsumersPerSubscription for a topic.
        参数:
        topic - Topic name
        抛出:
        PulsarAdminException - Unexpected error
      • removeMaxConsumersPerSubscriptionAsync

        java.util.concurrent.CompletableFuture<java.lang.Void> removeMaxConsumersPerSubscriptionAsync​(java.lang.String topic)
        Remove the maxConsumersPerSubscription for a topic asynchronously.
        参数:
        topic - Topic name
      • getMaxProducers

        java.lang.Integer getMaxProducers​(java.lang.String topic)
                                   throws PulsarAdminException
        Get the max number of producer for specified topic.
        参数:
        topic - Topic name
        返回:
        Configuration of bookkeeper persistence policies
        抛出:
        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.
        参数:
        topic - Topic name
        返回:
        Configuration of bookkeeper persistence policies
        抛出:
        PulsarAdminException - Unexpected error
      • getMaxProducers

        java.lang.Integer getMaxProducers​(java.lang.String topic,
                                          boolean applied)
                                   throws PulsarAdminException
        Get the max number of producer applied for specified topic.
        参数:
        topic -
        applied -
        返回:
        抛出:
        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.
        参数:
        topic -
        applied -
        返回:
      • setMaxProducers

        void setMaxProducers​(java.lang.String topic,
                             int maxProducers)
                      throws PulsarAdminException
        Set the max number of producer for specified topic.
        参数:
        topic - Topic name
        maxProducers - Max number of producer
        抛出:
        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.
        参数:
        topic - Topic name
        maxProducers - Max number of producer
        抛出:
        PulsarAdminException - Unexpected error
      • removeMaxProducers

        void removeMaxProducers​(java.lang.String topic)
                         throws PulsarAdminException
        Remove the max number of producer for specified topic.
        参数:
        topic - Topic name
        抛出:
        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.
        参数:
        topic - Topic name
      • getMaxSubscriptionsPerTopic

        java.lang.Integer getMaxSubscriptionsPerTopic​(java.lang.String topic)
                                               throws PulsarAdminException
        Get the max number of subscriptions for specified topic.
        参数:
        topic - Topic name
        返回:
        Configuration of bookkeeper persistence policies
        抛出:
        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.
        参数:
        topic - Topic name
        返回:
        Configuration of bookkeeper persistence policies
        抛出:
        PulsarAdminException - Unexpected error
      • setMaxSubscriptionsPerTopic

        void setMaxSubscriptionsPerTopic​(java.lang.String topic,
                                         int maxSubscriptionsPerTopic)
                                  throws PulsarAdminException
        Set the max number of subscriptions for specified topic.
        参数:
        topic - Topic name
        maxSubscriptionsPerTopic - Max number of subscriptions
        抛出:
        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.
        参数:
        topic - Topic name
        maxSubscriptionsPerTopic - Max number of subscriptions
        抛出:
        PulsarAdminException - Unexpected error
      • removeMaxSubscriptionsPerTopic

        void removeMaxSubscriptionsPerTopic​(java.lang.String topic)
                                     throws PulsarAdminException
        Remove the max number of subscriptions for specified topic.
        参数:
        topic - Topic name
        抛出:
        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.
        参数:
        topic - Topic name
      • getMaxMessageSize

        java.lang.Integer getMaxMessageSize​(java.lang.String topic)
                                     throws PulsarAdminException
        Get the max message size for specified topic.
        参数:
        topic - Topic name
        返回:
        Configuration of bookkeeper persistence policies
        抛出:
        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.
        参数:
        topic - Topic name
        返回:
        Configuration of bookkeeper persistence policies
        抛出:
        PulsarAdminException - Unexpected error
      • setMaxMessageSize

        void setMaxMessageSize​(java.lang.String topic,
                               int maxMessageSize)
                        throws PulsarAdminException
        Set the max message size for specified topic.
        参数:
        topic - Topic name
        maxMessageSize - Max message size of producer
        抛出:
        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.
        参数:
        topic - Topic name
        maxMessageSize - Max message size of topic
        抛出:
        PulsarAdminException - Unexpected error
      • removeMaxMessageSize

        void removeMaxMessageSize​(java.lang.String topic)
                           throws PulsarAdminException
        Remove the max message size for specified topic.
        参数:
        topic - Topic name
        抛出:
        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.
        参数:
        topic - Topic name
      • getMaxConsumers

        java.lang.Integer getMaxConsumers​(java.lang.String topic)
                                   throws PulsarAdminException
        Get the max number of consumer for specified topic.
        参数:
        topic - Topic name
        返回:
        Configuration of bookkeeper persistence policies
        抛出:
        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.
        参数:
        topic - Topic name
        返回:
        Configuration of bookkeeper persistence policies
        抛出:
        PulsarAdminException - Unexpected error
      • getMaxConsumers

        java.lang.Integer getMaxConsumers​(java.lang.String topic,
                                          boolean applied)
                                   throws PulsarAdminException
        Get the max number of consumer applied for specified topic.
        参数:
        topic -
        applied -
        返回:
        抛出:
        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.
        参数:
        topic -
        applied -
        返回:
      • setMaxConsumers

        void setMaxConsumers​(java.lang.String topic,
                             int maxConsumers)
                      throws PulsarAdminException
        Set the max number of consumer for specified topic.
        参数:
        topic - Topic name
        maxConsumers - Max number of consumer
        抛出:
        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.
        参数:
        topic - Topic name
        maxConsumers - Max number of consumer
        抛出:
        PulsarAdminException - Unexpected error
      • removeMaxConsumers

        void removeMaxConsumers​(java.lang.String topic)
                         throws PulsarAdminException
        Remove the max number of consumer for specified topic.
        参数:
        topic - Topic name
        抛出:
        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.
        参数:
        topic - Topic name
      • getDeduplicationSnapshotInterval

        java.lang.Integer getDeduplicationSnapshotInterval​(java.lang.String topic)
                                                    throws PulsarAdminException
        Get the deduplication snapshot interval for specified topic.
        参数:
        topic -
        返回:
        抛出:
        PulsarAdminException
      • getDeduplicationSnapshotIntervalAsync

        java.util.concurrent.CompletableFuture<java.lang.Integer> getDeduplicationSnapshotIntervalAsync​(java.lang.String topic)
        Get the deduplication snapshot interval for specified topic asynchronously.
        参数:
        topic -
        返回:
      • setDeduplicationSnapshotInterval

        void setDeduplicationSnapshotInterval​(java.lang.String topic,
                                              int interval)
                                       throws PulsarAdminException
        Set the deduplication snapshot interval for specified topic.
        参数:
        topic -
        interval -
        抛出:
        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.
        参数:
        topic -
        interval -
        返回:
      • removeDeduplicationSnapshotInterval

        void removeDeduplicationSnapshotInterval​(java.lang.String topic)
                                          throws PulsarAdminException
        Remove the deduplication snapshot interval for specified topic.
        参数:
        topic -
        抛出:
        PulsarAdminException
      • removeDeduplicationSnapshotIntervalAsync

        java.util.concurrent.CompletableFuture<java.lang.Void> removeDeduplicationSnapshotIntervalAsync​(java.lang.String topic)
        Remove the deduplication snapshot interval for specified topic asynchronously.
        参数:
        topic -
        返回:
      • setSubscriptionTypesEnabled

        void setSubscriptionTypesEnabled​(java.lang.String topic,
                                         java.util.Set<org.apache.pulsar.client.api.SubscriptionType> subscriptionTypesEnabled)
                                  throws PulsarAdminException
        Set is enable sub types.
        参数:
        topic -
        subscriptionTypesEnabled - is enable subTypes
        抛出:
        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.
        参数:
        topic -
        subscriptionTypesEnabled - is enable subTypes
      • getSubscriptionTypesEnabled

        java.util.Set<org.apache.pulsar.client.api.SubscriptionType> getSubscriptionTypesEnabled​(java.lang.String topic)
                                                                                          throws PulsarAdminException
        Get is enable sub types.
        参数:
        topic - is topic for get is enable sub types
        返回:
        set of enable sub types
        抛出:
        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.
        参数:
        topic - is topic for get is enable sub types
      • setSubscribeRate

        void setSubscribeRate​(java.lang.String topic,
                              SubscribeRate subscribeRate)
                       throws PulsarAdminException
        Set topic-subscribe-rate (topic will limit by subscribeRate).
        参数:
        topic -
        subscribeRate - consumer subscribe limit by this subscribeRate
        抛出:
        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.
        参数:
        topic -
        subscribeRate - consumer subscribe limit by this subscribeRate
      • 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.

        参数:
        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).
        参数:
        topic -
        抛出:
        PulsarAdminException - Unexpected error
      • getSubscribeRateAsync

        java.util.concurrent.CompletableFuture<SubscribeRate> getSubscribeRateAsync​(java.lang.String topic,
                                                                                    boolean applied)
        Get applied topic-subscribe-rate asynchronously.
        参数:
        topic -
      • removeSubscribeRate

        void removeSubscribeRate​(java.lang.String topic)
                          throws PulsarAdminException
        Remove topic-subscribe-rate.

        Remove topic subscribe rate

        参数:
        topic -
        抛出:
        PulsarAdminException - unexpected error
      • removeSubscribeRateAsync

        java.util.concurrent.CompletableFuture<java.lang.Void> removeSubscribeRateAsync​(java.lang.String topic)
                                                                                 throws PulsarAdminException
        Remove topic-subscribe-rate asynchronously.

        Remove topic subscribe rate

        参数:
        topic -
        抛出:
        PulsarAdminException - unexpected error