接口 Topics


public interface Topics
Admin interface for Topics management.
  • 方法详细资料

    • getList

      List<String> getList(String namespace) throws PulsarAdminException
      Get the both persistent and non-persistent topics under a namespace.

      Response example:

       ["topic://my-tenant/my-namespace/topic-1",
        "topic://my-tenant/my-namespace/topic-2"]
       
      参数:
      namespace - Namespace name
      返回:
      a list of topics
      抛出:
      PulsarAdminException.NotAuthorizedException - Don't have admin permission
      PulsarAdminException.NotFoundException - Namespace does not exist
      PulsarAdminException - Unexpected error
    • getList

      List<String> getList(String namespace, TopicDomain topicDomain) throws PulsarAdminException
      Get the list of topics under a namespace.

      Response example:

       ["topic://my-tenant/my-namespace/topic-1",
        "topic://my-tenant/my-namespace/topic-2"]
       
      参数:
      namespace - Namespace name
      topicDomain - use TopicDomain.persistent to get persistent topics use TopicDomain.non_persistent to get non-persistent topics Use null to get both persistent and non-persistent topics
      返回:
      a list of topics
      抛出:
      PulsarAdminException.NotAuthorizedException - Don't have admin permission
      PulsarAdminException.NotFoundException - Namespace does not exist
      PulsarAdminException - Unexpected error
    • getList

      List<String> getList(String namespace, TopicDomain topicDomain, Map<Topics.QueryParam,Object> params) throws PulsarAdminException
      Get the list of topics under a namespace.

      Response example:

       ["topic://my-tenant/my-namespace/topic-1",
        "topic://my-tenant/my-namespace/topic-2"]
       
      参数:
      namespace - Namespace name
      topicDomain - use TopicDomain.persistent to get persistent topics use TopicDomain.non_persistent to get non-persistent topics Use null to get both persistent and non-persistent topics
      params - params to filter the results
      返回:
      a list of topics
      抛出:
      PulsarAdminException.NotAuthorizedException - Don't have admin permission
      PulsarAdminException.NotFoundException - Namespace does not exist
      PulsarAdminException - Unexpected error
    • getListAsync

      CompletableFuture<List<String>> getListAsync(String namespace)
      Get both persistent and non-persistent topics under a namespace asynchronously.

      Response example:

       ["topic://my-tenant/my-namespace/topic-1",
        "topic://my-tenant/my-namespace/topic-2"]
       
      参数:
      namespace - Namespace name
      返回:
      a list of topics
    • getListAsync

      CompletableFuture<List<String>> getListAsync(String namespace, TopicDomain topicDomain)
      Get the list of topics under a namespace asynchronously.

      Response example:

       ["topic://my-tenant/my-namespace/topic-1",
        "topic://my-tenant/my-namespace/topic-2"]
       
      参数:
      namespace - Namespace name
      topicDomain - use TopicDomain.persistent to get persistent topics use TopicDomain.non_persistent to get non-persistent topics Use null to get both persistent and non-persistent topics
      返回:
      a list of topics
    • getListAsync

      CompletableFuture<List<String>> getListAsync(String namespace, TopicDomain topicDomain, Map<Topics.QueryParam,Object> params)
      Get the list of topics under a namespace asynchronously.

      Response example:

       ["topic://my-tenant/my-namespace/topic-1",
        "topic://my-tenant/my-namespace/topic-2"]
       
      参数:
      namespace - Namespace name
      topicDomain - use TopicDomain.persistent to get persistent topics use TopicDomain.non_persistent to get non-persistent topics Use null to get both persistent and non-persistent topics
      params - params to filter the results
      返回:
      a list of topics
    • getPartitionedTopicList

      List<String> getPartitionedTopicList(String namespace) throws PulsarAdminException
      Get the list of partitioned topics under a namespace.

      Response example:

       ["persistent://my-tenant/my-namespace/topic-1",
        "persistent://my-tenant/my-namespace/topic-2"]
       
      参数:
      namespace - Namespace name
      返回:
      a list of partitioned topics
      抛出:
      PulsarAdminException.NotAuthorizedException - Don't have admin permission
      PulsarAdminException.NotFoundException - Namespace does not exist
      PulsarAdminException - Unexpected error
    • getPartitionedTopicListAsync

      CompletableFuture<List<String>> getPartitionedTopicListAsync(String namespace)
      Get the list of partitioned topics under a namespace asynchronously.

      Response example:

       ["persistent://my-tenant/my-namespace/topic-1",
        "persistent://my-tenant/my-namespace/topic-2"]
       
      参数:
      namespace - Namespace name
      返回:
      a list of partitioned topics
    • getListInBundle

      List<String> getListInBundle(String namespace, String bundleRange) throws PulsarAdminException
      Get list of topics exist into given bundle.
      参数:
      namespace -
      bundleRange -
      返回:
      抛出:
      PulsarAdminException
    • getListInBundleAsync

      CompletableFuture<List<String>> getListInBundleAsync(String namespace, String bundleRange)
      Get list of topics exist into given bundle asynchronously.
      参数:
      namespace -
      bundleRange -
      返回:
    • getPermissions

      Map<String,Set<AuthAction>> getPermissions(String topic) throws PulsarAdminException
      Get permissions on a topic.

      Retrieve the effective permissions for a topic. These permissions are defined by the permissions set at the namespace level combined (union) with any eventual specific permission set on the topic.

      Response Example:

       {
         "role-1" : [ "produce" ],
         "role-2" : [ "consume" ]
       }
       
      参数:
      topic - Topic url
      返回:
      a map of topics an their permissions set
      抛出:
      PulsarAdminException.NotAuthorizedException - Don't have admin permission
      PulsarAdminException.NotFoundException - Namespace does not exist
      PulsarAdminException - Unexpected error
    • getPermissionsAsync

      CompletableFuture<Map<String,Set<AuthAction>>> getPermissionsAsync(String topic)
      Get permissions on a topic asynchronously.

      Retrieve the effective permissions for a topic. These permissions are defined by the permissions set at the namespace level combined (union) with any eventual specific permission set on the topic.

      Response Example:

       {
         "role-1" : [ "produce" ],
         "role-2" : [ "consume" ]
       }
       
      参数:
      topic - Topic url
      返回:
      a map of topics an their permissions set
    • grantPermission

      void grantPermission(String topic, String role, Set<AuthAction> actions) throws PulsarAdminException
      Grant permission on a topic.

      Grant a new permission to a client role on a single topic.

      Request parameter example:

       ["produce", "consume"]
       
      参数:
      topic - Topic url
      role - Client role to which grant permission
      actions - Auth actions (produce and consume)
      抛出:
      PulsarAdminException.NotAuthorizedException - Don't have admin permission
      PulsarAdminException.NotFoundException - Namespace does not exist
      PulsarAdminException.ConflictException - Concurrent modification
      PulsarAdminException - Unexpected error
    • grantPermissionAsync

      CompletableFuture<Void> grantPermissionAsync(String topic, String role, Set<AuthAction> actions)
      Grant permission on a topic asynchronously.

      Grant a new permission to a client role on a single topic.

      Request parameter example:

       ["produce", "consume"]
       
      参数:
      topic - Topic url
      role - Client role to which grant permission
      actions - Auth actions (produce and consume)
    • revokePermissions

      void revokePermissions(String topic, String role) throws PulsarAdminException
      Revoke permissions on a topic.

      Revoke permissions to a client role on a single topic. If the permission was not set at the topic level, but rather at the namespace level, this operation will return an error (HTTP status code 412).

      参数:
      topic - Topic url
      role - Client role to which remove permission
      抛出:
      PulsarAdminException.NotAuthorizedException - Don't have admin permission
      PulsarAdminException.NotFoundException - Namespace does not exist
      PulsarAdminException.PreconditionFailedException - Permissions are not set at the topic level
      PulsarAdminException - Unexpected error
    • revokePermissionsAsync

      CompletableFuture<Void> revokePermissionsAsync(String topic, String role)
      Revoke permissions on a topic asynchronously.

      Revoke permissions to a client role on a single topic. If the permission was not set at the topic level, but rather at the namespace level, this operation will return an error (HTTP status code 412).

      参数:
      topic - Topic url
      role - Client role to which remove permission
    • createPartitionedTopic

      default void createPartitionedTopic(String topic, int numPartitions) throws PulsarAdminException
      Create a partitioned topic.

      Create a partitioned topic. It needs to be called before creating a producer for a partitioned topic.

      参数:
      topic - Topic name
      numPartitions - Number of partitions to create of the topic
      抛出:
      PulsarAdminException
    • createPartitionedTopic

      void createPartitionedTopic(String topic, int numPartitions, Map<String,String> properties) throws PulsarAdminException
      Create a partitioned topic.

      Create a partitioned topic. It needs to be called before creating a producer for a partitioned topic.

      参数:
      topic - Topic name
      numPartitions - Number of partitions to create of the topic
      properties - topic properties
      抛出:
      PulsarAdminException
    • createPartitionedTopicAsync

      default CompletableFuture<Void> createPartitionedTopicAsync(String topic, int numPartitions)
      Create a partitioned topic asynchronously.

      Create a partitioned topic asynchronously. It needs to be called before creating a producer for a partitioned topic.

      参数:
      topic - Topic name
      numPartitions - Number of partitions to create of the topic
      返回:
      a future that can be used to track when the partitioned topic is created
    • createPartitionedTopicAsync

      CompletableFuture<Void> createPartitionedTopicAsync(String topic, int numPartitions, Map<String,String> properties)
      Create a partitioned topic asynchronously.

      Create a partitioned topic asynchronously. It needs to be called before creating a producer for a partitioned topic.

      参数:
      topic - Topic name
      numPartitions - Number of partitions to create of the topic
      properties - Topic properties
      返回:
      a future that can be used to track when the partitioned topic is created
    • createNonPartitionedTopic

      default void createNonPartitionedTopic(String topic) throws PulsarAdminException
      Create a non-partitioned topic.

      Create a non-partitioned topic.

      参数:
      topic - Topic name
      抛出:
      PulsarAdminException
    • createNonPartitionedTopic

      void createNonPartitionedTopic(String topic, Map<String,String> properties) throws PulsarAdminException
      Create a non-partitioned topic.

      Create a non-partitioned topic.

      参数:
      topic - Topic name
      properties - Topic properties
      抛出:
      PulsarAdminException
    • createNonPartitionedTopicAsync

      default CompletableFuture<Void> createNonPartitionedTopicAsync(String topic)
      Create a non-partitioned topic asynchronously.
      参数:
      topic - Topic name
    • createNonPartitionedTopicAsync

      CompletableFuture<Void> createNonPartitionedTopicAsync(String topic, Map<String,String> properties)
      Create a non-partitioned topic asynchronously.
      参数:
      topic - Topic name
      properties - Topic properties
    • createMissedPartitions

      void createMissedPartitions(String topic) throws PulsarAdminException
      Create missed partitions for partitioned topic.

      When disable topic auto creation, use this method to try create missed partitions while partitions create failed or users already have partitioned topic without partitions.

      参数:
      topic - partitioned topic name
      抛出:
      PulsarAdminException
    • createMissedPartitionsAsync

      CompletableFuture<Void> createMissedPartitionsAsync(String topic)
      Create missed partitions for partitioned topic asynchronously.

      When disable topic auto creation, use this method to try create missed partitions while partitions create failed or users already have partitioned topic without partitions.

      参数:
      topic - partitioned topic name
    • updatePartitionedTopic

      void updatePartitionedTopic(String topic, int numPartitions) throws PulsarAdminException
      Update number of partitions of a non-global partitioned topic.

      It requires partitioned-topic to be already exist and number of new partitions must be greater than existing number of partitions. Decrementing number of partitions requires deletion of topic which is not supported.

      参数:
      topic - Topic name
      numPartitions - Number of new partitions of already exist partitioned-topic
      抛出:
      PulsarAdminException
    • updatePartitionedTopicAsync

      CompletableFuture<Void> updatePartitionedTopicAsync(String topic, int numPartitions)
      Update number of partitions of a non-global partitioned topic asynchronously.

      It requires partitioned-topic to be already exist and number of new partitions must be greater than existing number of partitions. Decrementing number of partitions requires deletion of topic which is not supported.

      参数:
      topic - Topic name
      numPartitions - Number of new partitions of already exist partitioned-topic
      返回:
      a future that can be used to track when the partitioned topic is updated
    • updatePartitionedTopic

      void updatePartitionedTopic(String topic, int numPartitions, boolean updateLocalTopicOnly, boolean force) throws PulsarAdminException
      Update number of partitions of a non-global partitioned topic.

      It requires partitioned-topic to be already exist and number of new partitions must be greater than existing number of partitions. Decrementing number of partitions requires deletion of topic which is not supported.

      参数:
      topic - Topic name
      numPartitions - Number of new partitions of already exist partitioned-topic
      updateLocalTopicOnly - Used by broker for global topic with multiple replicated clusters
      force - Update forcefully without validating existing partitioned topic
      抛出:
      PulsarAdminException
    • updatePartitionedTopicAsync

      CompletableFuture<Void> updatePartitionedTopicAsync(String topic, int numPartitions, boolean updateLocalTopicOnly, boolean force)
      Update number of partitions of a non-global partitioned topic asynchronously.

      It requires partitioned-topic to be already exist and number of new partitions must be greater than existing number of partitions. Decrementing number of partitions requires deletion of topic which is not supported.

      参数:
      topic - Topic name
      numPartitions - Number of new partitions of already exist partitioned-topic
      updateLocalTopicOnly - Used by broker for global topic with multiple replicated clusters
      force - Update forcefully without validating existing partitioned topic
      返回:
      a future that can be used to track when the partitioned topic is updated
    • updatePartitionedTopic

      void updatePartitionedTopic(String topic, int numPartitions, boolean updateLocalTopicOnly) throws PulsarAdminException
      Update number of partitions of a non-global partitioned topic.

      It requires partitioned-topic to be already exist and number of new partitions must be greater than existing number of partitions. Decrementing number of partitions requires deletion of topic which is not supported.

      参数:
      topic - Topic name
      numPartitions - Number of new partitions of already exist partitioned-topic
      updateLocalTopicOnly - Used by broker for global topic with multiple replicated clusters
      抛出:
      PulsarAdminException
    • updatePartitionedTopicAsync

      CompletableFuture<Void> updatePartitionedTopicAsync(String topic, int numPartitions, boolean updateLocalTopicOnly)
      Update number of partitions of a non-global partitioned topic asynchronously.

      It requires partitioned-topic to be already exist and number of new partitions must be greater than existing number of partitions. Decrementing number of partitions requires deletion of topic which is not supported.

      参数:
      topic - Topic name
      numPartitions - Number of new partitions of already exist partitioned-topic
      updateLocalTopicOnly - Used by broker for global topic with multiple replicated clusters
      返回:
      a future that can be used to track when the partitioned topic is updated
    • getPartitionedTopicMetadata

      PartitionedTopicMetadata getPartitionedTopicMetadata(String topic) throws PulsarAdminException
      Get metadata of a partitioned topic.

      Get metadata of a partitioned topic.

      参数:
      topic - Topic name
      返回:
      Partitioned topic metadata
      抛出:
      PulsarAdminException
    • getPartitionedTopicMetadataAsync

      CompletableFuture<PartitionedTopicMetadata> getPartitionedTopicMetadataAsync(String topic)
      Get metadata of a partitioned topic asynchronously.

      Get metadata of a partitioned topic asynchronously.

      参数:
      topic - Topic name
      返回:
      a future that can be used to track when the partitioned topic metadata is returned
    • getProperties

      Map<String,String> getProperties(String topic) throws PulsarAdminException
      Get properties of a topic.
      参数:
      topic - Topic name
      返回:
      Topic properties
      抛出:
      PulsarAdminException
    • getPropertiesAsync

      CompletableFuture<Map<String,String>> getPropertiesAsync(String topic)
      Get properties of a topic asynchronously.
      参数:
      topic - Topic name
      返回:
      a future that can be used to track when the topic properties is returned
    • deletePartitionedTopic

      void deletePartitionedTopic(String topic, boolean force, boolean deleteSchema) throws PulsarAdminException
      Delete a partitioned topic.

      It will also delete all the partitions of the topic if it exists.

      参数:
      topic - Topic name
      force - Delete topic forcefully
      deleteSchema - Delete topic's schema storage
      抛出:
      PulsarAdminException
    • deletePartitionedTopic

      default void deletePartitionedTopic(String topic, boolean force) throws PulsarAdminException
      抛出:
      PulsarAdminException
      另请参阅:
    • deletePartitionedTopicAsync

      CompletableFuture<Void> deletePartitionedTopicAsync(String topic, boolean force, boolean deleteSchema)
      Delete a partitioned topic asynchronously.

      It will also delete all the partitions of the topic if it exists.

      参数:
      topic - Topic name
      force - Delete topic forcefully
      deleteSchema - Delete topic's schema storage
      返回:
      a future that can be used to track when the partitioned topic is deleted
    • deletePartitionedTopicAsync

      default CompletableFuture<Void> deletePartitionedTopicAsync(String topic, boolean force)
      另请参阅:
    • deletePartitionedTopic

      void deletePartitionedTopic(String topic) throws PulsarAdminException
      Delete a partitioned topic.

      It will also delete all the partitions of the topic if it exists.

      参数:
      topic - Topic name
      抛出:
      PulsarAdminException
    • deletePartitionedTopicAsync

      CompletableFuture<Void> deletePartitionedTopicAsync(String topic)
      Delete a partitioned topic asynchronously.

      It will also delete all the partitions of the topic if it exists.

      参数:
      topic - Topic name
    • delete

      void delete(String topic, boolean force, boolean deleteSchema) throws PulsarAdminException
      Delete a topic.

      Delete a topic. The topic cannot be deleted if force flag is disable and there's any active subscription or producer connected to the it. Force flag deletes topic forcefully by closing all active producers and consumers.

      参数:
      topic - Topic name
      force - Delete topic forcefully
      deleteSchema - Delete topic's schema storage
      抛出:
      PulsarAdminException.NotAuthorizedException - Don't have admin permission
      PulsarAdminException.NotFoundException - Topic does not exist
      PulsarAdminException.PreconditionFailedException - Topic has active subscriptions or producers
      PulsarAdminException - Unexpected error
    • delete

      default void delete(String topic, boolean force) throws PulsarAdminException
      抛出:
      PulsarAdminException
      另请参阅:
    • deleteAsync

      CompletableFuture<Void> deleteAsync(String topic, boolean force, boolean deleteSchema)
      Delete a topic asynchronously.

      Delete a topic asynchronously. The topic cannot be deleted if force flag is disable and there's any active subscription or producer connected to the it. Force flag deletes topic forcefully by closing all active producers and consumers.

      参数:
      topic - topic name
      force - Delete topic forcefully
      deleteSchema - Delete topic's schema storage
      返回:
      a future that can be used to track when the topic is deleted
    • deleteAsync

      default CompletableFuture<Void> deleteAsync(String topic, boolean force)
      另请参阅:
    • delete

      void delete(String topic) throws PulsarAdminException
      Delete a topic.

      Delete a topic. The topic cannot be deleted if there's any active subscription or producer connected to the it.

      参数:
      topic - Topic name
      抛出:
      PulsarAdminException.NotAuthorizedException - Don't have admin permission
      PulsarAdminException.NotFoundException - Topic does not exist
      PulsarAdminException.PreconditionFailedException - Topic has active subscriptions or producers
      PulsarAdminException - Unexpected error
    • deleteAsync

      CompletableFuture<Void> deleteAsync(String topic)
      Delete a topic asynchronously.

      Delete a topic. The topic cannot be deleted if there's any active subscription or producer connected to the it.

      参数:
      topic - Topic name
    • unload

      void unload(String topic) throws PulsarAdminException
      Unload a topic.

      参数:
      topic - topic name
      抛出:
      PulsarAdminException.NotAuthorizedException - Don't have admin permission
      PulsarAdminException.NotFoundException - topic does not exist
      PulsarAdminException - Unexpected error
    • unloadAsync

      CompletableFuture<Void> unloadAsync(String topic)
      Unload a topic asynchronously.

      参数:
      topic - topic name
      返回:
      a future that can be used to track when the topic is unloaded
    • terminateTopic

      org.apache.pulsar.client.api.MessageId terminateTopic(String topic) throws PulsarAdminException
      Terminate the topic and prevent any more messages being published on it.

      参数:
      topic - topic name
      返回:
      the message id of the last message that was published in the topic
      抛出:
      PulsarAdminException.NotAuthorizedException - Don't have admin permission
      PulsarAdminException.NotFoundException - topic does not exist
      PulsarAdminException - Unexpected error
    • terminateTopicAsync

      CompletableFuture<org.apache.pulsar.client.api.MessageId> terminateTopicAsync(String topic)
      Terminate the topic and prevent any more messages being published on it.

      参数:
      topic - topic name
      返回:
      the message id of the last message that was published in the topic
    • terminatePartitionedTopic

      Map<Integer,org.apache.pulsar.client.api.MessageId> terminatePartitionedTopic(String topic) throws PulsarAdminException
      Terminate the partitioned topic and prevent any more messages being published on it.

      参数:
      topic - topic name
      返回:
      the message id of the last message that was published in the each partition of topic
      抛出:
      PulsarAdminException
    • terminatePartitionedTopicAsync

      CompletableFuture<Map<Integer,org.apache.pulsar.client.api.MessageId>> terminatePartitionedTopicAsync(String topic)
      Terminate the partitioned topic and prevent any more messages being published on it.

      参数:
      topic - topic name
      返回:
      the message id of the last message that was published in the each partition of topic
    • getSubscriptions

      List<String> getSubscriptions(String topic) throws PulsarAdminException
      Get the list of subscriptions.

      Get the list of persistent subscriptions for a given topic.

      参数:
      topic - topic name
      返回:
      the list of subscriptions
      抛出:
      PulsarAdminException.NotAuthorizedException - Don't have admin permission
      PulsarAdminException.NotFoundException - Topic does not exist
      PulsarAdminException - Unexpected error
    • getSubscriptionsAsync

      CompletableFuture<List<String>> getSubscriptionsAsync(String topic)
      Get the list of subscriptions asynchronously.

      Get the list of persistent subscriptions for a given topic.

      参数:
      topic - topic name
      返回:
      a future that can be used to track when the list of subscriptions is returned
    • getStats

      TopicStats getStats(String topic, GetStatsOptions getStatsOptions) throws PulsarAdminException
      Get the stats for the topic.

      Response Example:

       
       {
         "msgRateIn" : 100.0,                    // Total rate of messages published on the topic. msg/s
         "msgThroughputIn" : 10240.0,            // Total throughput of messages published on the topic. byte/s
         "msgRateOut" : 100.0,                   // Total rate of messages delivered on the topic. msg/s
         "msgThroughputOut" : 10240.0,           // Total throughput of messages delivered on the topic. byte/s
         "averageMsgSize" : 1024.0,              // Average size of published messages. bytes
         "publishers" : [                        // List of publishes on this topic with their stats
            {
                "producerId" : 10                // producer id
                "address"   : 10.4.1.23:3425     // IP and port for this producer
                "connectedSince" : 2014-11-21 23:54:46 // Timestamp of this published connection
                "msgRateIn" : 100.0,             // Total rate of messages published by this producer. msg/s
                "msgThroughputIn" : 10240.0,     // Total throughput of messages published by this producer. byte/s
                "averageMsgSize" : 1024.0,       // Average size of published messages by this producer. bytes
            },
         ],
         "subscriptions" : {                     // Map of subscriptions on this topic
           "sub1" : {
             "msgRateOut" : 100.0,               // Total rate of messages delivered on this subscription. msg/s
             "msgThroughputOut" : 10240.0,       // Total throughput delivered on this subscription. bytes/s
             "msgBacklog" : 0,                   // Number of messages in the subscriotion backlog
             "type" : Exclusive                  // Whether the subscription is exclusive or shared
             "consumers" [                       // List of consumers on this subscription
                {
                    "id" : 5                            // Consumer id
                    "address" : 10.4.1.23:3425          // IP and port for this consumer
                    "connectedSince" : 2014-11-21 23:54:46 // Timestamp of this consumer connection
                    "msgRateOut" : 100.0,               // Total rate of messages delivered to this consumer. msg/s
                    "msgThroughputOut" : 10240.0,       // Total throughput delivered to this consumer. bytes/s
                }
             ],
         },
         "replication" : {                    // Replication statistics
           "cluster_1" : {                    // Cluster name in the context of from-cluster or to-cluster
             "msgRateIn" : 100.0,             // Total rate of messages received from this remote cluster. msg/s
             "msgThroughputIn" : 10240.0,     // Total throughput received from this remote cluster. bytes/s
             "msgRateOut" : 100.0,            // Total rate of messages delivered to the replication-subscriber. msg/s
             "msgThroughputOut" : 10240.0,    // Total throughput delivered to the replication-subscriber. bytes/s
             "replicationBacklog" : 0,        // Number of messages pending to be replicated to this remote cluster
             "connected" : true,              // Whether the replication-subscriber is currently connected locally
           },
           "cluster_2" : {
             "msgRateIn" : 100.0,
             "msgThroughputIn" : 10240.0,
             "msgRateOut" : 100.0,
             "msgThroughputOut" : 10240.0,
             "replicationBacklog" : 0,
             "connected" : true,
           }
         },
       }
       
       

      All the rates are computed over a 1 minute window and are relative the last completed 1 minute period.

      参数:
      topic - topic name
      getStatsOptions - get stats options
      返回:
      the topic statistics
      抛出:
      PulsarAdminException.NotAuthorizedException - Don't have admin permission
      PulsarAdminException.NotFoundException - Topic does not exist
      PulsarAdminException - Unexpected error
    • getStats

      default TopicStats getStats(String topic, boolean getPreciseBacklog, boolean subscriptionBacklogSize, boolean getEarliestTimeInBacklog) throws PulsarAdminException
      抛出:
      PulsarAdminException
    • getStats

      default TopicStats getStats(String topic, boolean getPreciseBacklog, boolean subscriptionBacklogSize) throws PulsarAdminException
      抛出:
      PulsarAdminException
    • getStats

      default TopicStats getStats(String topic, boolean getPreciseBacklog) throws PulsarAdminException
      抛出:
      PulsarAdminException
    • getStats

      default TopicStats getStats(String topic) throws PulsarAdminException
      抛出:
      PulsarAdminException
    • getStatsAsync

      CompletableFuture<TopicStats> getStatsAsync(String topic, boolean getPreciseBacklog, boolean subscriptionBacklogSize, boolean getEarliestTimeInBacklog)
      Get the stats for the topic asynchronously. All the rates are computed over a 1 minute window and are relative the last completed 1 minute period.
      参数:
      topic - topic name
      getPreciseBacklog - Set to true to get precise backlog, Otherwise get imprecise backlog.
      subscriptionBacklogSize - Whether to get backlog size for each subscription.
      getEarliestTimeInBacklog - Whether to get the earliest time in backlog.
      返回:
      a future that can be used to track when the topic statistics are returned
    • getStatsAsync

      default CompletableFuture<TopicStats> getStatsAsync(String topic)
    • getInternalStats

      PersistentTopicInternalStats getInternalStats(String topic, boolean metadata) throws PulsarAdminException
      Get the internal stats for the topic.

      Access the internal state of the topic

      参数:
      topic - topic name
      metadata - flag to include ledger metadata
      返回:
      the topic statistics
      抛出:
      PulsarAdminException.NotAuthorizedException - Don't have admin permission
      PulsarAdminException.NotFoundException - Topic does not exist
      PulsarAdminException - Unexpected error
    • getInternalStats

      Get the internal stats for the topic.

      Access the internal state of the topic

      参数:
      topic - topic name
      返回:
      the topic statistics
      抛出:
      PulsarAdminException.NotAuthorizedException - Don't have admin permission
      PulsarAdminException.NotFoundException - Topic does not exist
      PulsarAdminException - Unexpected error
    • getInternalStatsAsync

      CompletableFuture<PersistentTopicInternalStats> getInternalStatsAsync(String topic, boolean metadata)
      Get the internal stats for the topic asynchronously.
      参数:
      topic - topic Name
      metadata - flag to include ledger metadata
      返回:
      a future that can be used to track when the internal topic statistics are returned
    • getInternalStatsAsync

      CompletableFuture<PersistentTopicInternalStats> getInternalStatsAsync(String topic)
      Get the internal stats for the topic asynchronously.
      参数:
      topic - topic Name
      返回:
      a future that can be used to track when the internal topic statistics are returned
    • getInternalInfo

      String getInternalInfo(String topic) throws PulsarAdminException
      Get a JSON representation of the topic metadata stored in ZooKeeper.
      参数:
      topic - topic name
      返回:
      the topic internal metadata
      抛出:
      PulsarAdminException.NotAuthorizedException - Don't have admin permission
      PulsarAdminException.NotFoundException - Topic does not exist
      PulsarAdminException - Unexpected error
    • getInternalInfoAsync

      CompletableFuture<String> getInternalInfoAsync(String topic)
      Get a JSON representation of the topic metadata stored in ZooKeeper.
      参数:
      topic - topic name
      返回:
      a future to receive the topic internal metadata
      抛出:
      PulsarAdminException.NotAuthorizedException - Don't have admin permission
      PulsarAdminException.NotFoundException - Topic does not exist
      PulsarAdminException - Unexpected error
    • getPartitionedStats

      PartitionedTopicStats getPartitionedStats(String topic, boolean perPartition, boolean getPreciseBacklog, boolean subscriptionBacklogSize) throws PulsarAdminException
      Get the stats for the partitioned topic

      Response Example:

       
       {
         "msgRateIn" : 100.0,                 // Total rate of messages published on the partitioned topic. msg/s
         "msgThroughputIn" : 10240.0,         // Total throughput of messages published on the partitioned topic. byte/s
         "msgRateOut" : 100.0,                // Total rate of messages delivered on the partitioned topic. msg/s
         "msgThroughputOut" : 10240.0,        // Total throughput of messages delivered on the partitioned topic. byte/s
         "averageMsgSize" : 1024.0,           // Average size of published messages. bytes
         "publishers" : [                     // List of publishes on this partitioned topic with their stats
            {
                "msgRateIn" : 100.0,          // Total rate of messages published by this producer. msg/s
                "msgThroughputIn" : 10240.0,  // Total throughput of messages published by this producer. byte/s
                "averageMsgSize" : 1024.0,    // Average size of published messages by this producer. bytes
            },
         ],
         "subscriptions" : {                  // Map of subscriptions on this topic
           "sub1" : {
             "msgRateOut" : 100.0,            // Total rate of messages delivered on this subscription. msg/s
             "msgThroughputOut" : 10240.0,    // Total throughput delivered on this subscription. bytes/s
             "msgBacklog" : 0,                // Number of messages in the subscriotion backlog
             "type" : Exclusive               // Whether the subscription is exclusive or shared
             "consumers" [                    // List of consumers on this subscription
                {
                    "msgRateOut" : 100.0,               // Total rate of messages delivered to this consumer. msg/s
                    "msgThroughputOut" : 10240.0,       // Total throughput delivered to this consumer. bytes/s
                }
             ],
         },
         "replication" : {                    // Replication statistics
           "cluster_1" : {                    // Cluster name in the context of from-cluster or to-cluster
             "msgRateIn" : 100.0,             // Total rate of messages received from this remote cluster. msg/s
             "msgThroughputIn" : 10240.0,     // Total throughput received from this remote cluster. bytes/s
             "msgRateOut" : 100.0,            // Total rate of messages delivered to the replication-subscriber. msg/s
             "msgThroughputOut" : 10240.0,    // Total throughput delivered to the replication-subscriber. bytes/s
             "replicationBacklog" : 0,        // Number of messages pending to be replicated to this remote cluster
             "connected" : true,              // Whether the replication-subscriber is currently connected locally
           },
           "cluster_2" : {
             "msgRateIn" : 100.0,
             "msgThroughputIn" : 10240.0,
             "msgRateOut" : 100.0,
             "msghroughputOut" : 10240.0,
             "replicationBacklog" : 0,
             "connected" : true,
           }
         },
       }
       
       

      All the rates are computed over a 1 minute window and are relative the last completed 1 minute period.

      参数:
      topic - topic name
      perPartition - flag to get stats per partition
      getPreciseBacklog - Set to true to get precise backlog, Otherwise get imprecise backlog.
      subscriptionBacklogSize - Whether to get backlog size for each subscription.
      返回:
      the partitioned topic statistics
      抛出:
      PulsarAdminException.NotAuthorizedException - Don't have admin permission
      PulsarAdminException.NotFoundException - Topic does not exist
      PulsarAdminException - Unexpected error
    • getPartitionedStats

      default PartitionedTopicStats getPartitionedStats(String topic, boolean perPartition) throws PulsarAdminException
      抛出:
      PulsarAdminException
    • getPartitionedStatsAsync

      CompletableFuture<PartitionedTopicStats> getPartitionedStatsAsync(String topic, boolean perPartition, boolean getPreciseBacklog, boolean subscriptionBacklogSize)
      Get the stats for the partitioned topic asynchronously.
      参数:
      topic - topic Name
      perPartition - flag to get stats per partition
      getPreciseBacklog - Set to true to get precise backlog, Otherwise get imprecise backlog.
      subscriptionBacklogSize - Whether to get backlog size for each subscription.
      返回:
      a future that can be used to track when the partitioned topic statistics are returned
    • getPartitionedStatsAsync

      default CompletableFuture<PartitionedTopicStats> getPartitionedStatsAsync(String topic, boolean perPartition)
    • getPartitionedInternalStats

      PartitionedTopicInternalStats getPartitionedInternalStats(String topic) throws PulsarAdminException
      Get the stats for the partitioned topic.
      参数:
      topic - topic name
      返回:
      抛出:
      PulsarAdminException
    • getPartitionedInternalStatsAsync

      CompletableFuture<PartitionedTopicInternalStats> getPartitionedInternalStatsAsync(String topic)
      Get the stats-internal for the partitioned topic asynchronously.
      参数:
      topic - topic Name
      返回:
      a future that can be used to track when the partitioned topic statistics are returned
    • deleteSubscription

      void deleteSubscription(String topic, String subName) throws PulsarAdminException
      Delete a subscription.

      Delete a persistent subscription from a topic. There should not be any active consumers on the subscription.

      参数:
      topic - topic name
      subName - Subscription name
      抛出:
      PulsarAdminException.NotAuthorizedException - Don't have admin permission
      PulsarAdminException.NotFoundException - Topic or subscription does not exist
      PulsarAdminException.PreconditionFailedException - Subscription has active consumers
      PulsarAdminException - Unexpected error
    • deleteSubscription

      void deleteSubscription(String topic, String subName, boolean force) throws PulsarAdminException
      Delete a subscription.

      Delete a persistent subscription from a topic. There should not be any active consumers on the subscription. Force flag deletes subscription forcefully by closing all active consumers.

      参数:
      topic - topic name
      subName - Subscription name
      force - Delete topic forcefully
      抛出:
      PulsarAdminException.NotAuthorizedException - Don't have admin permission
      PulsarAdminException.NotFoundException - Topic or subscription does not exist
      PulsarAdminException.PreconditionFailedException - Subscription has active consumers
      PulsarAdminException - Unexpected error
    • deleteSubscriptionAsync

      CompletableFuture<Void> deleteSubscriptionAsync(String topic, String subName)
      Delete a subscription asynchronously.

      Delete a persistent subscription from a topic. There should not be any active consumers on the subscription.

      参数:
      topic - topic name
      subName - Subscription name
      返回:
      a future that can be used to track when the subscription is deleted
    • deleteSubscriptionAsync

      CompletableFuture<Void> deleteSubscriptionAsync(String topic, String subName, boolean force)
      Delete a subscription asynchronously.

      Delete a persistent subscription from a topic. There should not be any active consumers on the subscription. Force flag deletes subscription forcefully by closing all active consumers.

      参数:
      topic - topic name
      subName - Subscription name
      force - Delete topic forcefully
      返回:
      a future that can be used to track when the subscription is deleted
    • skipAllMessages

      void skipAllMessages(String topic, String subName) throws PulsarAdminException
      Skip all messages on a topic subscription.

      Completely clears the backlog on the subscription.

      参数:
      topic - topic name
      subName - Subscription name
      抛出:
      PulsarAdminException.NotAuthorizedException - Don't have admin permission
      PulsarAdminException.NotFoundException - Topic or subscription does not exist
      PulsarAdminException - Unexpected error
    • skipAllMessagesAsync

      CompletableFuture<Void> skipAllMessagesAsync(String topic, String subName)
      Skip all messages on a topic subscription asynchronously.

      Completely clears the backlog on the subscription.

      参数:
      topic - topic name
      subName - Subscription name
      返回:
      a future that can be used to track when all the messages are skipped
    • skipMessages

      void skipMessages(String topic, String subName, long numMessages) throws PulsarAdminException
      Skip messages on a topic subscription.
      参数:
      topic - topic name
      subName - Subscription name
      numMessages - Number of messages
      抛出:
      PulsarAdminException.NotAuthorizedException - Don't have admin permission
      PulsarAdminException.NotFoundException - Topic or subscription does not exist
      PulsarAdminException - Unexpected error
    • skipMessagesAsync

      CompletableFuture<Void> skipMessagesAsync(String topic, String subName, long numMessages)
      Skip messages on a topic subscription asynchronously.
      参数:
      topic - topic name
      subName - Subscription name
      numMessages - Number of messages
      返回:
      a future that can be used to track when the number of messages are skipped
    • expireMessages

      void expireMessages(String topic, String subscriptionName, long expireTimeInSeconds) throws PulsarAdminException
      Expire all messages older than given N (expireTimeInSeconds) seconds for a given subscription.
      参数:
      topic - topic name
      subscriptionName - Subscription name
      expireTimeInSeconds - Expire messages older than time in seconds
      抛出:
      PulsarAdminException - Unexpected error
    • expireMessagesAsync

      CompletableFuture<Void> expireMessagesAsync(String topic, String subscriptionName, long expireTimeInSeconds)
      Expire all messages older than given N (expireTimeInSeconds) seconds for a given subscription asynchronously.
      参数:
      topic - topic name
      subscriptionName - Subscription name
      expireTimeInSeconds - Expire messages older than time in seconds
      返回:
    • expireMessages

      void expireMessages(String topic, String subscriptionName, org.apache.pulsar.client.api.MessageId messageId, boolean isExcluded) throws PulsarAdminException
      Expire all messages older than given N (expireTimeInSeconds) seconds for a given subscription.
      参数:
      topic - topic name
      subscriptionName - Subscription name
      messageId - Position before which all messages will be expired.
      isExcluded - Will message at passed in position also be expired.
      抛出:
      PulsarAdminException - Unexpected error
    • expireMessagesAsync

      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.
      参数:
      topic - topic name
      subscriptionName - Subscription name
      messageId - Position before which all messages will be expired.
      isExcluded - Will message at passed in position also be expired.
      返回:
      A CompletableFuture that'll be completed when expire message is done.
    • expireMessagesForAllSubscriptions

      void expireMessagesForAllSubscriptions(String topic, long expireTimeInSeconds) throws PulsarAdminException
      Expire all messages older than given N seconds for all subscriptions of the persistent-topic.
      参数:
      topic - topic name
      expireTimeInSeconds - Expire messages older than time in seconds
      抛出:
      PulsarAdminException - Unexpected error
    • expireMessagesForAllSubscriptionsAsync

      CompletableFuture<Void> expireMessagesForAllSubscriptionsAsync(String topic, long expireTimeInSeconds)
      Expire all messages older than given N seconds for all subscriptions of the persistent-topic asynchronously.
      参数:
      topic - topic name
      expireTimeInSeconds - Expire messages older than time in seconds
    • peekMessages

      List<org.apache.pulsar.client.api.Message<byte[]>> peekMessages(String topic, String subName, int numMessages) throws PulsarAdminException
      Peek messages from a topic subscription.
      参数:
      topic - topic name
      subName - Subscription name
      numMessages - Number of messages
      返回:
      抛出:
      PulsarAdminException.NotAuthorizedException - Don't have admin permission
      PulsarAdminException.NotFoundException - Topic or subscription does not exist
      PulsarAdminException - Unexpected error
    • peekMessagesAsync

      CompletableFuture<List<org.apache.pulsar.client.api.Message<byte[]>>> peekMessagesAsync(String topic, String subName, int numMessages)
      Peek messages from a topic subscription asynchronously.
      参数:
      topic - topic name
      subName - Subscription name
      numMessages - Number of messages
      返回:
      a future that can be used to track when the messages are returned
    • getMessageById

      org.apache.pulsar.client.api.Message<byte[]> getMessageById(String topic, long ledgerId, long entryId) throws PulsarAdminException
      Get a message by its messageId via a topic subscription.
      参数:
      topic - Topic name
      ledgerId - Ledger id
      entryId - Entry id
      返回:
      the message indexed by the messageId
      抛出:
      PulsarAdminException - Unexpected error
    • getMessageByIdAsync

      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.
      参数:
      topic - Topic name
      ledgerId - Ledger id
      entryId - Entry id
      返回:
      a future that can be used to track when the message is returned
    • getMessageIdByTimestamp

      org.apache.pulsar.client.api.MessageId getMessageIdByTimestamp(String topic, long timestamp) throws PulsarAdminException
      Get message ID published at or just after this absolute timestamp (in ms).
      参数:
      topic - Topic name
      timestamp - Timestamp
      返回:
      MessageId
      抛出:
      PulsarAdminException - Unexpected error
    • getMessageIdByTimestampAsync

      CompletableFuture<org.apache.pulsar.client.api.MessageId> getMessageIdByTimestampAsync(String topic, long timestamp)
      Get message ID published at or just after this absolute timestamp (in ms) asynchronously.
      参数:
      topic - Topic name
      timestamp - Timestamp
      返回:
      a future that can be used to track when the message ID is returned.
    • createSubscription

      default void createSubscription(String topic, String subscriptionName, org.apache.pulsar.client.api.MessageId messageId) throws PulsarAdminException
      Create a new subscription on a topic.
      参数:
      topic - topic name
      subscriptionName - Subscription name
      messageId - 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 permission
      PulsarAdminException.ConflictException - Subscription already exists
      PulsarAdminException.NotAllowedException - Command disallowed for requested resource
      PulsarAdminException - Unexpected error
    • createSubscriptionAsync

      default CompletableFuture<Void> createSubscriptionAsync(String topic, String subscriptionName, org.apache.pulsar.client.api.MessageId messageId)
      Create a new subscription on a topic.
      参数:
      topic - topic name
      subscriptionName - Subscription name
      messageId - The MessageId on where to initialize the subscription. It could be MessageId.latest, MessageId.earliest or a specific message id.
    • createSubscription

      default void createSubscription(String topic, String subscriptionName, org.apache.pulsar.client.api.MessageId messageId, boolean replicated) throws PulsarAdminException
      Create a new subscription on a topic.
      参数:
      topic - topic name
      subscriptionName - Subscription name
      messageId - The MessageId on where to initialize the subscription. It could be MessageId.latest, MessageId.earliest or a specific message id.
      replicated - replicated subscriptions.
      抛出:
      PulsarAdminException.NotAuthorizedException - Don't have admin permission
      PulsarAdminException.ConflictException - Subscription already exists
      PulsarAdminException.NotAllowedException - Command disallowed for requested resource
      PulsarAdminException - Unexpected error
    • createSubscription

      void createSubscription(String topic, String subscriptionName, org.apache.pulsar.client.api.MessageId messageId, boolean replicated, Map<String,String> properties) throws PulsarAdminException
      Create a new subscription on a topic.
      参数:
      topic - topic name
      subscriptionName - Subscription name
      messageId - The MessageId on where to initialize the subscription. It could be MessageId.latest, MessageId.earliest or a specific message id.
      replicated - replicated subscriptions.
      properties - subscription properties.
      抛出:
      PulsarAdminException.NotAuthorizedException - Don't have admin permission
      PulsarAdminException.ConflictException - Subscription already exists
      PulsarAdminException.NotAllowedException - Command disallowed for requested resource
      PulsarAdminException - Unexpected error
    • createSubscriptionAsync

      default CompletableFuture<Void> createSubscriptionAsync(String topic, String subscriptionName, org.apache.pulsar.client.api.MessageId messageId, boolean replicated)
      Create a new subscription on a topic.
      参数:
      topic - topic name
      subscriptionName - Subscription name
      messageId - The MessageId on where to initialize the subscription. It could be MessageId.latest, MessageId.earliest or a specific message id.
    • createSubscriptionAsync

      CompletableFuture<Void> createSubscriptionAsync(String topic, String subscriptionName, org.apache.pulsar.client.api.MessageId messageId, boolean replicated, Map<String,String> properties)
      Create a new subscription on a topic.
      参数:
      topic - topic name
      subscriptionName - Subscription name
      messageId - The MessageId on where to initialize the subscription. It could be MessageId.latest, MessageId.earliest or a specific message id.
      replicated - replicated subscriptions.
      properties - subscription properties.
    • resetCursor

      void resetCursor(String topic, String subName, long timestamp) throws PulsarAdminException
      Reset cursor position on a topic subscription.
      参数:
      topic - topic name
      subName - Subscription name
      timestamp - reset subscription to position closest to time in ms since epoch
      抛出:
      PulsarAdminException.NotAuthorizedException - Don't have admin permission
      PulsarAdminException.NotFoundException - Topic or subscription does not exist
      PulsarAdminException.NotAllowedException - Command disallowed for requested resource
      PulsarAdminException - Unexpected error
    • resetCursor

      void resetCursor(String topic, String subName, org.apache.pulsar.client.api.MessageId messageId, boolean isExcluded) throws PulsarAdminException
      Reset cursor position on a topic subscription.

      and start consume messages from the next position of the reset position.

      参数:
      topic -
      subName -
      messageId -
      isExcluded -
      抛出:
      PulsarAdminException
    • updateSubscriptionProperties

      void updateSubscriptionProperties(String topic, String subName, Map<String,String> subscriptionProperties) throws PulsarAdminException
      Update Subscription Properties on a topic subscription. The new properties will override the existing values, properties that are not passed will be removed.
      参数:
      topic -
      subName -
      subscriptionProperties -
      抛出:
      PulsarAdminException
    • resetCursorAsync

      CompletableFuture<Void> resetCursorAsync(String topic, String subName, long timestamp)
      Reset cursor position on a topic subscription.
      参数:
      topic - topic name
      subName - Subscription name
      timestamp - reset subscription to position closest to time in ms since epoch
    • resetCursorAsync

      CompletableFuture<Void> resetCursorAsync(String topic, String subName, org.apache.pulsar.client.api.MessageId messageId, boolean isExcluded)
      Reset cursor position on a topic subscription.

      and start consume messages from the next position of the reset position.

      参数:
      topic -
      subName -
      messageId -
      isExcluded -
      返回:
    • updateSubscriptionPropertiesAsync

      CompletableFuture<Void> updateSubscriptionPropertiesAsync(String topic, String subName, Map<String,String> subscriptionProperties)
      Update Subscription Properties on a topic subscription. The new properties will override the existing values, properties that are not passed will be removed.
      参数:
      topic -
      subName -
      subscriptionProperties -
    • resetCursor

      void resetCursor(String topic, String subName, org.apache.pulsar.client.api.MessageId messageId) throws PulsarAdminException
      Reset cursor position on a topic subscription.
      参数:
      topic - topic name
      subName - Subscription name
      messageId - reset subscription to messageId (or previous nearest messageId if given messageId is not valid)
      抛出:
      PulsarAdminException.NotAuthorizedException - Don't have admin permission
      PulsarAdminException.NotFoundException - Topic or subscription does not exist
      PulsarAdminException.NotAllowedException - Command disallowed for requested resource
      PulsarAdminException - Unexpected error
    • resetCursorAsync

      CompletableFuture<Void> resetCursorAsync(String topic, String subName, org.apache.pulsar.client.api.MessageId messageId)
      Reset cursor position on a topic subscription.
      参数:
      topic - topic name
      subName - Subscription name
      messageId - reset subscription to messageId (or previous nearest messageId if given messageId is not valid)
    • triggerCompaction

      void triggerCompaction(String topic) throws PulsarAdminException
      Trigger compaction to run for a topic. A single topic can only have one instance of compaction running at any time. Any attempt to trigger another will be met with a ConflictException.
      参数:
      topic - The topic on which to trigger compaction
      抛出:
      PulsarAdminException
    • triggerCompactionAsync

      CompletableFuture<Void> triggerCompactionAsync(String topic)
      Trigger compaction to run for a topic asynchronously.
      参数:
      topic - The topic on which to trigger compaction
    • compactionStatus

      LongRunningProcessStatus compactionStatus(String topic) throws PulsarAdminException
      Check the status of an ongoing compaction for a topic.
      参数:
      topic - The topic whose compaction status we wish to check
      抛出:
      PulsarAdminException
    • compactionStatusAsync

      CompletableFuture<LongRunningProcessStatus> compactionStatusAsync(String topic)
      Check the status of an ongoing compaction for a topic asynchronously.
      参数:
      topic - The topic whose compaction status we wish to check
    • triggerOffload

      void triggerOffload(String topic, org.apache.pulsar.client.api.MessageId messageId) throws PulsarAdminException
      Trigger offloading messages in topic to longterm storage.
      参数:
      topic - the topic to offload
      messageId - ID of maximum message which should be offloaded
      抛出:
      PulsarAdminException
    • triggerOffloadAsync

      CompletableFuture<Void> triggerOffloadAsync(String topic, org.apache.pulsar.client.api.MessageId messageId)
      Trigger offloading messages in topic to longterm storage asynchronously.
      参数:
      topic - the topic to offload
      messageId - ID of maximum message which should be offloaded
    • offloadStatus

      OffloadProcessStatus offloadStatus(String topic) throws PulsarAdminException
      Check the status of an ongoing offloading operation for a topic.
      参数:
      topic - the topic being offloaded
      返回:
      the status of the offload operation
      抛出:
      PulsarAdminException
    • offloadStatusAsync

      CompletableFuture<OffloadProcessStatus> offloadStatusAsync(String topic)
      Check the status of an ongoing offloading operation for a topic asynchronously.
      参数:
      topic - the topic being offloaded
      返回:
      the status of the offload operation
    • getLastMessageId

      org.apache.pulsar.client.api.MessageId getLastMessageId(String topic) throws PulsarAdminException
      Get the last commit message Id of a topic.
      参数:
      topic - the topic name
      返回:
      抛出:
      PulsarAdminException
    • getLastMessageIdAsync

      CompletableFuture<org.apache.pulsar.client.api.MessageId> getLastMessageIdAsync(String topic)
      Get the last commit message Id of a topic asynchronously.
      参数:
      topic - the topic name
      返回:
    • getBacklogQuotaMap

      已过时。
      Get backlog quota map for a topic. Response example:
       
        {
            "namespace_memory" : {
                "limit" : "134217728",
                "policy" : "consumer_backlog_eviction"
            },
            "destination_storage" : {
                "limit" : "-1",
                "policy" : "producer_exception"
            }
        }
       
       
      参数:
      topic - Topic name
      抛出:
      PulsarAdminException.NotAuthorizedException - Permission denied
      PulsarAdminException.NotFoundException - Topic does not exist
      PulsarAdminException - Unexpected error
    • getBacklogQuotaMap

      @Deprecated Map<BacklogQuota.BacklogQuotaType,BacklogQuota> getBacklogQuotaMap(String topic, boolean applied) throws PulsarAdminException
      已过时。
      Get applied backlog quota map for a topic.
      参数:
      topic -
      applied -
      返回:
      抛出:
      PulsarAdminException
    • getBacklogSizeByMessageId

      Long getBacklogSizeByMessageId(String topic, org.apache.pulsar.client.api.MessageId messageId) throws PulsarAdminException
      Get backlog size by a message ID.
      参数:
      topic - Topic name
      messageId - message ID
      返回:
      the backlog size from
      抛出:
      PulsarAdminException - Unexpected error
    • getBacklogSizeByMessageIdAsync

      CompletableFuture<Long> getBacklogSizeByMessageIdAsync(String topic, org.apache.pulsar.client.api.MessageId messageId)
      Get backlog size by a message ID asynchronously.
      参数:
      topic - Topic name
      messageId - message ID
      返回:
      the backlog size from
    • setBacklogQuota

      @Deprecated void setBacklogQuota(String topic, BacklogQuota backlogQuota, BacklogQuota.BacklogQuotaType backlogQuotaType) throws PulsarAdminException
      已过时。
      Set a backlog quota for a topic. The backlog quota can be set on this resource:

      Request parameter example:

       
       {
           "limit" : "134217728",
           "policy" : "consumer_backlog_eviction"
       }
       
       
      参数:
      topic - Topic name
      backlogQuota - the new BacklogQuota
      backlogQuotaType -
      抛出:
      PulsarAdminException.NotAuthorizedException - Don't have admin permission
      PulsarAdminException.NotFoundException - Topic does not exist
      PulsarAdminException - Unexpected error
    • setBacklogQuota

      @Deprecated default void setBacklogQuota(String topic, BacklogQuota backlogQuota) throws PulsarAdminException
      已过时。
      抛出:
      PulsarAdminException
    • removeBacklogQuota

      @Deprecated void removeBacklogQuota(String topic, BacklogQuota.BacklogQuotaType backlogQuotaType) throws PulsarAdminException
      已过时。
      Remove a backlog quota policy from a topic. The namespace backlog policy will fall back to the default.
      参数:
      topic - Topic name
      backlogQuotaType -
      抛出:
      PulsarAdminException.NotAuthorizedException - Don't have admin permission
      PulsarAdminException.NotFoundException - Topic does not exist
      PulsarAdminException - Unexpected error
    • removeBacklogQuota

      @Deprecated default void removeBacklogQuota(String topic) throws PulsarAdminException
      已过时。
      抛出:
      PulsarAdminException
    • getDelayedDeliveryPolicy

      @Deprecated DelayedDeliveryPolicies getDelayedDeliveryPolicy(String topic, boolean applied) throws PulsarAdminException
      已过时。
      Get the delayed delivery policy applied for a specified topic.
      参数:
      topic -
      applied -
      返回:
      抛出:
      PulsarAdminException
    • getDelayedDeliveryPolicyAsync

      @Deprecated CompletableFuture<DelayedDeliveryPolicies> getDelayedDeliveryPolicyAsync(String topic, boolean applied)
      已过时。
      Get the delayed delivery policy applied for a specified topic asynchronously.
      参数:
      topic -
      applied -
      返回:
    • getDelayedDeliveryPolicy

      @Deprecated DelayedDeliveryPolicies getDelayedDeliveryPolicy(String topic) throws PulsarAdminException
      已过时。
      Get the delayed delivery policy for a specified topic.
      参数:
      topic -
      返回:
      抛出:
      PulsarAdminException
    • getDelayedDeliveryPolicyAsync

      @Deprecated CompletableFuture<DelayedDeliveryPolicies> getDelayedDeliveryPolicyAsync(String topic)
      已过时。
      Get the delayed delivery policy for a specified topic asynchronously.
      参数:
      topic -
      返回:
    • setDelayedDeliveryPolicy

      @Deprecated void setDelayedDeliveryPolicy(String topic, DelayedDeliveryPolicies delayedDeliveryPolicies) throws PulsarAdminException
      已过时。
      Set the delayed delivery policy for a specified topic.
      参数:
      topic -
      delayedDeliveryPolicies -
      抛出:
      PulsarAdminException
    • setDelayedDeliveryPolicyAsync

      @Deprecated CompletableFuture<Void> setDelayedDeliveryPolicyAsync(String topic, DelayedDeliveryPolicies delayedDeliveryPolicies)
      已过时。
      Set the delayed delivery policy for a specified topic asynchronously.
      参数:
      topic -
      delayedDeliveryPolicies -
      返回:
    • removeDelayedDeliveryPolicyAsync

      @Deprecated CompletableFuture<Void> removeDelayedDeliveryPolicyAsync(String topic)
      已过时。
      Remove the delayed delivery policy for a specified topic asynchronously.
      参数:
      topic -
      返回:
    • removeDelayedDeliveryPolicy

      @Deprecated void removeDelayedDeliveryPolicy(String topic) throws PulsarAdminException
      已过时。
      Remove the delayed delivery policy for a specified topic.
      参数:
      topic -
      抛出:
      PulsarAdminException
    • setMessageTTL

      @Deprecated void setMessageTTL(String topic, int messageTTLInSecond) throws PulsarAdminException
      已过时。
      Set message TTL for a topic.
      参数:
      topic - Topic name
      messageTTLInSecond - Message TTL in second.
      抛出:
      PulsarAdminException.NotAuthorizedException - Don't have admin permission
      PulsarAdminException.NotFoundException - Topic does not exist
      PulsarAdminException - Unexpected error
    • getMessageTTL

      @Deprecated Integer getMessageTTL(String topic) throws PulsarAdminException
      已过时。
      Get message TTL for a topic.
      参数:
      topic -
      返回:
      Message TTL in second.
      抛出:
      PulsarAdminException.NotAuthorizedException - Don't have admin permission
      PulsarAdminException.NotFoundException - Topic does not exist
      PulsarAdminException - Unexpected error
    • getMessageTTL

      @Deprecated Integer getMessageTTL(String topic, boolean applied) throws PulsarAdminException
      已过时。
      Get message TTL applied for a topic.
      参数:
      topic -
      返回:
      抛出:
      PulsarAdminException
    • removeMessageTTL

      @Deprecated void removeMessageTTL(String topic) throws PulsarAdminException
      已过时。
      Remove message TTL for a topic.
      参数:
      topic -
      抛出:
      PulsarAdminException.NotAuthorizedException - Don't have admin permission
      PulsarAdminException.NotFoundException - Topic does not exist
      PulsarAdminException - Unexpected error
    • setRetention

      @Deprecated void setRetention(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
      抛出:
      PulsarAdminException.NotAuthorizedException - Don't have admin permission
      PulsarAdminException.NotFoundException - Topic does not exist
      PulsarAdminException.ConflictException - Concurrent modification
      PulsarAdminException - Unexpected error
    • setRetentionAsync

      @Deprecated CompletableFuture<Void> setRetentionAsync(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

      已过时。
      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
      抛出:
      PulsarAdminException.NotAuthorizedException - Don't have admin permission
      PulsarAdminException.NotFoundException - Topic does not exist
      PulsarAdminException.ConflictException - Concurrent modification
      PulsarAdminException - Unexpected error
    • getRetentionAsync

      已过时。
      Get the retention configuration for a topic asynchronously.

      Get the retention configuration for a topic.

      参数:
      topic - Topic name
    • getRetention

      @Deprecated RetentionPolicies getRetention(String topic, boolean applied) throws PulsarAdminException
      已过时。
      Get the applied retention configuration for a topic.
      参数:
      topic -
      applied -
      返回:
      抛出:
      PulsarAdminException
    • getRetentionAsync

      @Deprecated CompletableFuture<RetentionPolicies> getRetentionAsync(String topic, boolean applied)
      已过时。
      Get the applied retention configuration for a topic asynchronously.
      参数:
      topic -
      applied -
      返回:
    • removeRetention

      @Deprecated void removeRetention(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
      抛出:
      PulsarAdminException.NotAuthorizedException - Don't have admin permission
      PulsarAdminException.NotFoundException - Topic does not exist
      PulsarAdminException.ConflictException - Concurrent modification
      PulsarAdminException - Unexpected error
    • removeRetentionAsync

      @Deprecated CompletableFuture<Void> removeRetentionAsync(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

      @Deprecated Integer getMaxUnackedMessagesOnConsumer(String topic) throws PulsarAdminException
      已过时。
      get max unacked messages on consumer of a topic.
      参数:
      topic -
      返回:
      抛出:
      PulsarAdminException
    • getMaxUnackedMessagesOnConsumerAsync

      @Deprecated CompletableFuture<Integer> getMaxUnackedMessagesOnConsumerAsync(String topic)
      已过时。
      get max unacked messages on consumer of a topic asynchronously.
      参数:
      topic -
      返回:
    • getMaxUnackedMessagesOnConsumer

      @Deprecated Integer getMaxUnackedMessagesOnConsumer(String topic, boolean applied) throws PulsarAdminException
      已过时。
      get applied max unacked messages on consumer of a topic.
      参数:
      topic -
      applied -
      返回:
      抛出:
      PulsarAdminException
    • getMaxUnackedMessagesOnConsumerAsync

      @Deprecated CompletableFuture<Integer> getMaxUnackedMessagesOnConsumerAsync(String topic, boolean applied)
      已过时。
      get applied max unacked messages on consumer of a topic asynchronously.
      参数:
      topic -
      applied -
      返回:
    • setMaxUnackedMessagesOnConsumer

      @Deprecated void setMaxUnackedMessagesOnConsumer(String topic, int maxNum) throws PulsarAdminException
      已过时。
      set max unacked messages on consumer of a topic.
      参数:
      topic -
      maxNum -
      抛出:
      PulsarAdminException
    • setMaxUnackedMessagesOnConsumerAsync

      @Deprecated CompletableFuture<Void> setMaxUnackedMessagesOnConsumerAsync(String topic, int maxNum)
      已过时。
      set max unacked messages on consumer of a topic asynchronously.
      参数:
      topic -
      maxNum -
      返回:
    • removeMaxUnackedMessagesOnConsumer

      @Deprecated void removeMaxUnackedMessagesOnConsumer(String topic) throws PulsarAdminException
      已过时。
      remove max unacked messages on consumer of a topic.
      参数:
      topic -
      抛出:
      PulsarAdminException
    • removeMaxUnackedMessagesOnConsumerAsync

      @Deprecated CompletableFuture<Void> removeMaxUnackedMessagesOnConsumerAsync(String topic)
      已过时。
      remove max unacked messages on consumer of a topic asynchronously.
      参数:
      topic -
      返回:
    • getInactiveTopicPolicies

      @Deprecated InactiveTopicPolicies getInactiveTopicPolicies(String topic, boolean applied) throws PulsarAdminException
      已过时。
      Get inactive topic policies applied for a topic.
      参数:
      topic -
      返回:
      抛出:
      PulsarAdminException
    • getInactiveTopicPoliciesAsync

      @Deprecated CompletableFuture<InactiveTopicPolicies> getInactiveTopicPoliciesAsync(String topic, boolean applied)
      已过时。
      Get inactive topic policies applied for a topic asynchronously.
      参数:
      topic -
      applied -
      返回:
    • getInactiveTopicPolicies

      @Deprecated InactiveTopicPolicies getInactiveTopicPolicies(String topic) throws PulsarAdminException
      已过时。
      get inactive topic policies of a topic.
      参数:
      topic -
      返回:
      抛出:
      PulsarAdminException
    • getInactiveTopicPoliciesAsync

      @Deprecated CompletableFuture<InactiveTopicPolicies> getInactiveTopicPoliciesAsync(String topic)
      已过时。
      get inactive topic policies of a topic asynchronously.
      参数:
      topic -
      返回:
    • setInactiveTopicPolicies

      @Deprecated void setInactiveTopicPolicies(String topic, InactiveTopicPolicies inactiveTopicPolicies) throws PulsarAdminException
      已过时。
      set inactive topic policies of a topic.
      参数:
      topic -
      inactiveTopicPolicies -
      抛出:
      PulsarAdminException
    • setInactiveTopicPoliciesAsync

      @Deprecated CompletableFuture<Void> setInactiveTopicPoliciesAsync(String topic, InactiveTopicPolicies inactiveTopicPolicies)
      已过时。
      set inactive topic policies of a topic asynchronously.
      参数:
      topic -
      inactiveTopicPolicies -
      返回:
    • removeInactiveTopicPolicies

      @Deprecated void removeInactiveTopicPolicies(String topic) throws PulsarAdminException
      已过时。
      remove inactive topic policies of a topic.
      参数:
      topic -
      抛出:
      PulsarAdminException
    • removeInactiveTopicPoliciesAsync

      @Deprecated CompletableFuture<Void> removeInactiveTopicPoliciesAsync(String topic)
      已过时。
      remove inactive topic policies of a topic asynchronously.
      参数:
      topic -
      返回:
    • getOffloadPolicies

      @Deprecated OffloadPolicies getOffloadPolicies(String topic) throws PulsarAdminException
      已过时。
      get offload policies of a topic.
      参数:
      topic -
      返回:
      抛出:
      PulsarAdminException
    • getOffloadPoliciesAsync

      @Deprecated CompletableFuture<OffloadPolicies> getOffloadPoliciesAsync(String topic)
      已过时。
      get offload policies of a topic asynchronously.
      参数:
      topic -
      返回:
    • getOffloadPolicies

      @Deprecated OffloadPolicies getOffloadPolicies(String topic, boolean applied) throws PulsarAdminException
      已过时。
      get applied offload policies of a topic.
      参数:
      topic -
      返回:
      抛出:
      PulsarAdminException
    • getOffloadPoliciesAsync

      @Deprecated CompletableFuture<OffloadPolicies> getOffloadPoliciesAsync(String topic, boolean applied)
      已过时。
      get applied offload policies of a topic asynchronously.
      参数:
      topic -
      返回:
    • setOffloadPolicies

      @Deprecated void setOffloadPolicies(String topic, OffloadPolicies offloadPolicies) throws PulsarAdminException
      已过时。
      set offload policies of a topic.
      参数:
      topic -
      offloadPolicies -
      抛出:
      PulsarAdminException
    • setOffloadPoliciesAsync

      @Deprecated CompletableFuture<Void> setOffloadPoliciesAsync(String topic, OffloadPolicies offloadPolicies)
      已过时。
      set offload policies of a topic asynchronously.
      参数:
      topic -
      offloadPolicies -
      返回:
    • removeOffloadPolicies

      @Deprecated void removeOffloadPolicies(String topic) throws PulsarAdminException
      已过时。
      remove offload policies of a topic.
      参数:
      topic -
      抛出:
      PulsarAdminException
    • removeOffloadPoliciesAsync

      @Deprecated CompletableFuture<Void> removeOffloadPoliciesAsync(String topic)
      已过时。
      remove offload policies of a topic asynchronously.
      参数:
      topic -
      返回:
    • getMaxUnackedMessagesOnSubscription

      @Deprecated Integer getMaxUnackedMessagesOnSubscription(String topic) throws PulsarAdminException
      已过时。
      get max unacked messages on subscription of a topic.
      参数:
      topic -
      返回:
      抛出:
      PulsarAdminException
    • getMaxUnackedMessagesOnSubscriptionAsync

      @Deprecated CompletableFuture<Integer> getMaxUnackedMessagesOnSubscriptionAsync(String topic)
      已过时。
      get max unacked messages on subscription of a topic asynchronously.
      参数:
      topic -
      返回:
    • getMaxUnackedMessagesOnSubscription

      @Deprecated Integer getMaxUnackedMessagesOnSubscription(String topic, boolean applied) throws PulsarAdminException
      已过时。
      get max unacked messages on subscription of a topic.
      参数:
      topic -
      返回:
      抛出:
      PulsarAdminException
    • getMaxUnackedMessagesOnSubscriptionAsync

      @Deprecated CompletableFuture<Integer> getMaxUnackedMessagesOnSubscriptionAsync(String topic, boolean applied)
      已过时。
      get max unacked messages on subscription of a topic asynchronously.
      参数:
      topic -
      返回:
    • setMaxUnackedMessagesOnSubscription

      @Deprecated void setMaxUnackedMessagesOnSubscription(String topic, int maxNum) throws PulsarAdminException
      已过时。
      set max unacked messages on subscription of a topic.
      参数:
      topic -
      maxNum -
      抛出:
      PulsarAdminException
    • setMaxUnackedMessagesOnSubscriptionAsync

      @Deprecated CompletableFuture<Void> setMaxUnackedMessagesOnSubscriptionAsync(String topic, int maxNum)
      已过时。
      set max unacked messages on subscription of a topic asynchronously.
      参数:
      topic -
      maxNum -
      返回:
    • removeMaxUnackedMessagesOnSubscription

      @Deprecated void removeMaxUnackedMessagesOnSubscription(String topic) throws PulsarAdminException
      已过时。
      remove max unacked messages on subscription of a topic.
      参数:
      topic -
      抛出:
      PulsarAdminException
    • removeMaxUnackedMessagesOnSubscriptionAsync

      @Deprecated CompletableFuture<Void> removeMaxUnackedMessagesOnSubscriptionAsync(String topic)
      已过时。
      remove max unacked messages on subscription of a topic asynchronously.
      参数:
      topic -
      返回:
    • setPersistence

      @Deprecated void setPersistence(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

      @Deprecated CompletableFuture<Void> setPersistenceAsync(String topic, PersistencePolicies persistencePolicies)
      已过时。
      Set the configuration of persistence policies for specified topic asynchronously.
      参数:
      topic - Topic name
      persistencePolicies - Configuration of bookkeeper persistence policies
    • getPersistence

      已过时。
      Get the configuration of persistence policies for specified topic.
      参数:
      topic - Topic name
      返回:
      Configuration of bookkeeper persistence policies
      抛出:
      PulsarAdminException - Unexpected error
    • getPersistenceAsync

      已过时。
      Get the configuration of persistence policies for specified topic asynchronously.
      参数:
      topic - Topic name
    • getPersistence

      @Deprecated PersistencePolicies getPersistence(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

      @Deprecated CompletableFuture<PersistencePolicies> getPersistenceAsync(String topic, boolean applied)
      已过时。
      Get the applied configuration of persistence policies for specified topic asynchronously.
      参数:
      topic - Topic name
    • removePersistence

      @Deprecated void removePersistence(String topic) throws PulsarAdminException
      已过时。
      Remove the configuration of persistence policies for specified topic.
      参数:
      topic - Topic name
      抛出:
      PulsarAdminException - Unexpected error
    • removePersistenceAsync

      @Deprecated CompletableFuture<Void> removePersistenceAsync(String topic)
      已过时。
      Remove the configuration of persistence policies for specified topic asynchronously.
      参数:
      topic - Topic name
    • getDeduplicationEnabled

      @Deprecated Boolean getDeduplicationEnabled(String topic) throws PulsarAdminException
      已过时。
      get deduplication enabled of a topic.
      参数:
      topic -
      返回:
      抛出:
      PulsarAdminException
    • getDeduplicationEnabledAsync

      @Deprecated CompletableFuture<Boolean> getDeduplicationEnabledAsync(String topic)
      已过时。
      get deduplication enabled of a topic asynchronously.
      参数:
      topic -
      返回:
    • getDeduplicationStatus

      @Deprecated Boolean getDeduplicationStatus(String topic) throws PulsarAdminException
      已过时。
      get deduplication enabled of a topic.
      参数:
      topic -
      返回:
      抛出:
      PulsarAdminException
    • getDeduplicationStatusAsync

      @Deprecated CompletableFuture<Boolean> getDeduplicationStatusAsync(String topic)
      已过时。
      get deduplication enabled of a topic asynchronously.
      参数:
      topic -
      返回:
    • getDeduplicationStatus

      @Deprecated Boolean getDeduplicationStatus(String topic, boolean applied) throws PulsarAdminException
      已过时。
      get applied deduplication enabled of a topic.
      参数:
      topic -
      返回:
      抛出:
      PulsarAdminException
    • getDeduplicationStatusAsync

      @Deprecated CompletableFuture<Boolean> getDeduplicationStatusAsync(String topic, boolean applied)
      已过时。
      get applied deduplication enabled of a topic asynchronously.
      参数:
      topic -
      返回:
    • enableDeduplication

      @Deprecated void enableDeduplication(String topic, boolean enabled) throws PulsarAdminException
      已过时。
      set deduplication enabled of a topic.
      参数:
      topic -
      enabled -
      抛出:
      PulsarAdminException
    • enableDeduplicationAsync

      @Deprecated CompletableFuture<Void> enableDeduplicationAsync(String topic, boolean enabled)
      已过时。
      set deduplication enabled of a topic asynchronously.
      参数:
      topic -
      enabled -
      返回:
    • setDeduplicationStatus

      @Deprecated void setDeduplicationStatus(String topic, boolean enabled) throws PulsarAdminException
      已过时。
      set deduplication enabled of a topic.
      参数:
      topic -
      enabled -
      抛出:
      PulsarAdminException
    • setDeduplicationStatusAsync

      @Deprecated CompletableFuture<Void> setDeduplicationStatusAsync(String topic, boolean enabled)
      已过时。
      set deduplication enabled of a topic asynchronously.
      参数:
      topic -
      enabled -
      返回:
    • disableDeduplication

      @Deprecated void disableDeduplication(String topic) throws PulsarAdminException
      已过时。
      remove deduplication enabled of a topic.
      参数:
      topic -
      抛出:
      PulsarAdminException
    • disableDeduplicationAsync

      @Deprecated CompletableFuture<Void> disableDeduplicationAsync(String topic)
      已过时。
      remove deduplication enabled of a topic asynchronously.
      参数:
      topic -
      返回:
    • removeDeduplicationStatus

      @Deprecated void removeDeduplicationStatus(String topic) throws PulsarAdminException
      已过时。
      remove deduplication enabled of a topic.
      参数:
      topic -
      抛出:
      PulsarAdminException
    • removeDeduplicationStatusAsync

      @Deprecated CompletableFuture<Void> removeDeduplicationStatusAsync(String topic)
      已过时。
      remove deduplication enabled of a topic asynchronously.
      参数:
      topic -
      返回:
    • setDispatchRate

      @Deprecated void setDispatchRate(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

      @Deprecated CompletableFuture<Void> setDispatchRateAsync(String topic, DispatchRate dispatchRate)
      已过时。
      Set message-dispatch-rate asynchronously.

      topic can dispatch this many messages per second

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

      @Deprecated DispatchRate getDispatchRate(String topic) throws PulsarAdminException
      已过时。
      Get message-dispatch-rate (topic can dispatch this many messages per second).
      参数:
      topic -
      抛出:
      PulsarAdminException - Unexpected error
    • getDispatchRateAsync

      @Deprecated CompletableFuture<DispatchRate> getDispatchRateAsync(String topic)
      已过时。
      Get message-dispatch-rate asynchronously.

      Topic can dispatch this many messages per second.

      参数:
      topic -
    • getDispatchRate

      @Deprecated DispatchRate getDispatchRate(String topic, boolean applied) throws PulsarAdminException
      已过时。
      Get applied message-dispatch-rate (topic can dispatch this many messages per second).
      参数:
      topic -
      抛出:
      PulsarAdminException - Unexpected error
    • getDispatchRateAsync

      @Deprecated CompletableFuture<DispatchRate> getDispatchRateAsync(String topic, boolean applied)
      已过时。
      Get applied message-dispatch-rate asynchronously.

      Topic can dispatch this many messages per second.

      参数:
      topic -
    • removeDispatchRate

      @Deprecated void removeDispatchRate(String topic) throws PulsarAdminException
      已过时。
      Remove message-dispatch-rate.

      Remove topic message dispatch rate

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

      @Deprecated CompletableFuture<Void> removeDispatchRateAsync(String topic) throws PulsarAdminException
      已过时。
      Remove message-dispatch-rate asynchronously.

      Remove topic message dispatch rate

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

      @Deprecated void setSubscriptionDispatchRate(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

      @Deprecated CompletableFuture<Void> setSubscriptionDispatchRateAsync(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

      @Deprecated DispatchRate getSubscriptionDispatchRate(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

      @Deprecated CompletableFuture<DispatchRate> getSubscriptionDispatchRateAsync(String namespace, boolean applied)
      已过时。
      Get applied subscription-message-dispatch-rate asynchronously.

      Subscriptions under this namespace can dispatch this many messages per second.

      参数:
      namespace -
    • getSubscriptionDispatchRate

      @Deprecated DispatchRate getSubscriptionDispatchRate(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

      @Deprecated CompletableFuture<DispatchRate> getSubscriptionDispatchRateAsync(String topic)
      已过时。
      Get subscription-message-dispatch-rate asynchronously.

      Subscriptions under this namespace can dispatch this many messages per second.

      参数:
      topic -
    • removeSubscriptionDispatchRate

      @Deprecated void removeSubscriptionDispatchRate(String topic) throws PulsarAdminException
      已过时。
      Remove subscription-message-dispatch-rate for a topic.
      参数:
      topic - Topic name
      抛出:
      PulsarAdminException - Unexpected error
    • removeSubscriptionDispatchRateAsync

      @Deprecated CompletableFuture<Void> removeSubscriptionDispatchRateAsync(String topic)
      已过时。
      Remove subscription-message-dispatch-rate for a topic asynchronously.
      参数:
      topic - Topic name
    • setReplicatorDispatchRate

      @Deprecated void setReplicatorDispatchRate(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

      @Deprecated CompletableFuture<Void> setReplicatorDispatchRateAsync(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

      @Deprecated DispatchRate getReplicatorDispatchRate(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

      @Deprecated CompletableFuture<DispatchRate> getReplicatorDispatchRateAsync(String topic)
      已过时。
      Get replicatorDispatchRate asynchronously.

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

      参数:
      topic -
    • getReplicatorDispatchRate

      @Deprecated DispatchRate getReplicatorDispatchRate(String topic, boolean applied) throws PulsarAdminException
      已过时。
      Get applied replicatorDispatchRate for the topic.
      参数:
      topic -
      applied -
      返回:
      抛出:
      PulsarAdminException
    • getReplicatorDispatchRateAsync

      @Deprecated CompletableFuture<DispatchRate> getReplicatorDispatchRateAsync(String topic, boolean applied)
      已过时。
      Get applied replicatorDispatchRate asynchronously.
      参数:
      topic -
      applied -
      返回:
    • removeReplicatorDispatchRate

      @Deprecated void removeReplicatorDispatchRate(String topic) throws PulsarAdminException
      已过时。
      Remove replicatorDispatchRate for a topic.
      参数:
      topic - Topic name
      抛出:
      PulsarAdminException - Unexpected error
    • removeReplicatorDispatchRateAsync

      @Deprecated CompletableFuture<Void> removeReplicatorDispatchRateAsync(String topic)
      已过时。
      Remove replicatorDispatchRate for a topic asynchronously.
      参数:
      topic - Topic name
    • getCompactionThreshold

      @Deprecated Long getCompactionThreshold(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
      抛出:
      PulsarAdminException.NotAuthorizedException - Don't have admin permission
      PulsarAdminException.NotFoundException - Namespace does not exist
      PulsarAdminException - Unexpected error
    • getCompactionThresholdAsync

      @Deprecated CompletableFuture<Long> getCompactionThresholdAsync(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

      @Deprecated Long getCompactionThreshold(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
      抛出:
      PulsarAdminException.NotAuthorizedException - Don't have admin permission
      PulsarAdminException.NotFoundException - Namespace does not exist
      PulsarAdminException - Unexpected error
    • getCompactionThresholdAsync

      @Deprecated CompletableFuture<Long> getCompactionThresholdAsync(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

      @Deprecated void setCompactionThreshold(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
      抛出:
      PulsarAdminException.NotAuthorizedException - Don't have admin permission
      PulsarAdminException.NotFoundException - Namespace does not exist
      PulsarAdminException - Unexpected error
    • setCompactionThresholdAsync

      @Deprecated CompletableFuture<Void> setCompactionThresholdAsync(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

      @Deprecated void removeCompactionThreshold(String topic) throws PulsarAdminException
      已过时。
      Remove the compactionThreshold for a topic.
      参数:
      topic - Topic name
      抛出:
      PulsarAdminException - Unexpected error
    • removeCompactionThresholdAsync

      @Deprecated CompletableFuture<Void> removeCompactionThresholdAsync(String topic)
      已过时。
      Remove the compactionThreshold for a topic asynchronously.
      参数:
      topic - Topic name
    • setPublishRate

      @Deprecated void setPublishRate(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

      @Deprecated CompletableFuture<Void> setPublishRateAsync(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

      @Deprecated PublishRate getPublishRate(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

      @Deprecated CompletableFuture<PublishRate> getPublishRateAsync(String topic)
      已过时。
      Get message-publish-rate (topics can publish this many messages per second) asynchronously.
      参数:
      topic -
      返回:
      number of messages per second
    • removePublishRate

      @Deprecated void removePublishRate(String topic) throws PulsarAdminException
      已过时。
      Remove message-publish-rate.

      Remove topic message publish rate

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

      @Deprecated CompletableFuture<Void> removePublishRateAsync(String topic) throws PulsarAdminException
      已过时。
      Remove message-publish-rate asynchronously.

      Remove topic message publish rate

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

      @Deprecated Integer getMaxConsumersPerSubscription(String topic) throws PulsarAdminException
      已过时。
      Get the maxConsumersPerSubscription for a topic.

      Response example:

       0
       
      参数:
      topic - Topic name
      抛出:
      PulsarAdminException.NotAuthorizedException - Don't have admin permission
      PulsarAdminException.NotFoundException - Namespace does not exist
      PulsarAdminException - Unexpected error
    • getMaxConsumersPerSubscriptionAsync

      @Deprecated CompletableFuture<Integer> getMaxConsumersPerSubscriptionAsync(String topic)
      已过时。
      Get the maxConsumersPerSubscription for a topic asynchronously.

      Response example:

       0
       
      参数:
      topic - Topic name
    • setMaxConsumersPerSubscription

      @Deprecated void setMaxConsumersPerSubscription(String topic, int maxConsumersPerSubscription) throws PulsarAdminException
      已过时。
      Set maxConsumersPerSubscription for a topic.

      Request example:

       10
       
      参数:
      topic - Topic name
      maxConsumersPerSubscription - maxConsumersPerSubscription value for a namespace
      抛出:
      PulsarAdminException.NotAuthorizedException - Don't have admin permission
      PulsarAdminException.NotFoundException - Namespace does not exist
      PulsarAdminException - Unexpected error
    • setMaxConsumersPerSubscriptionAsync

      @Deprecated CompletableFuture<Void> setMaxConsumersPerSubscriptionAsync(String topic, int maxConsumersPerSubscription)
      已过时。
      Set maxConsumersPerSubscription for a topic asynchronously.

      Request example:

       10
       
      参数:
      topic - Topic name
      maxConsumersPerSubscription - maxConsumersPerSubscription value for a namespace
    • removeMaxConsumersPerSubscription

      @Deprecated void removeMaxConsumersPerSubscription(String topic) throws PulsarAdminException
      已过时。
      Remove the maxConsumersPerSubscription for a topic.
      参数:
      topic - Topic name
      抛出:
      PulsarAdminException - Unexpected error
    • removeMaxConsumersPerSubscriptionAsync

      @Deprecated CompletableFuture<Void> removeMaxConsumersPerSubscriptionAsync(String topic)
      已过时。
      Remove the maxConsumersPerSubscription for a topic asynchronously.
      参数:
      topic - Topic name
    • getMaxProducers

      @Deprecated Integer getMaxProducers(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

      @Deprecated CompletableFuture<Integer> getMaxProducersAsync(String topic)
      已过时。
      Get the max number of producer for specified topic asynchronously.
      参数:
      topic - Topic name
      返回:
      Configuration of bookkeeper persistence policies
      抛出:
      PulsarAdminException - Unexpected error
    • getMaxProducers

      @Deprecated Integer getMaxProducers(String topic, boolean applied) throws PulsarAdminException
      已过时。
      Get the max number of producer applied for specified topic.
      参数:
      topic -
      applied -
      返回:
      抛出:
      PulsarAdminException
    • getMaxProducersAsync

      @Deprecated CompletableFuture<Integer> getMaxProducersAsync(String topic, boolean applied)
      已过时。
      Get the max number of producer applied for specified topic asynchronously.
      参数:
      topic -
      applied -
      返回:
    • setMaxProducers

      @Deprecated void setMaxProducers(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

      @Deprecated CompletableFuture<Void> setMaxProducersAsync(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

      @Deprecated void removeMaxProducers(String topic) throws PulsarAdminException
      已过时。
      Remove the max number of producer for specified topic.
      参数:
      topic - Topic name
      抛出:
      PulsarAdminException - Unexpected error
    • removeMaxProducersAsync

      @Deprecated CompletableFuture<Void> removeMaxProducersAsync(String topic)
      已过时。
      Remove the max number of producer for specified topic asynchronously.
      参数:
      topic - Topic name
    • getMaxSubscriptionsPerTopic

      @Deprecated Integer getMaxSubscriptionsPerTopic(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

      @Deprecated CompletableFuture<Integer> getMaxSubscriptionsPerTopicAsync(String topic)
      已过时。
      Get the max number of subscriptions for specified topic asynchronously.
      参数:
      topic - Topic name
      返回:
      Configuration of bookkeeper persistence policies
      抛出:
      PulsarAdminException - Unexpected error
    • setMaxSubscriptionsPerTopic

      @Deprecated void setMaxSubscriptionsPerTopic(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

      @Deprecated CompletableFuture<Void> setMaxSubscriptionsPerTopicAsync(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

      @Deprecated void removeMaxSubscriptionsPerTopic(String topic) throws PulsarAdminException
      已过时。
      Remove the max number of subscriptions for specified topic.
      参数:
      topic - Topic name
      抛出:
      PulsarAdminException - Unexpected error
    • removeMaxSubscriptionsPerTopicAsync

      @Deprecated CompletableFuture<Void> removeMaxSubscriptionsPerTopicAsync(String topic)
      已过时。
      Remove the max number of subscriptions for specified topic asynchronously.
      参数:
      topic - Topic name
    • getMaxMessageSize

      @Deprecated Integer getMaxMessageSize(String topic) throws PulsarAdminException
      已过时。
      Get the max message size for specified topic.
      参数:
      topic - Topic name
      返回:
      Configuration of bookkeeper persistence policies
      抛出:
      PulsarAdminException - Unexpected error
    • getMaxMessageSizeAsync

      @Deprecated CompletableFuture<Integer> getMaxMessageSizeAsync(String topic)
      已过时。
      Get the max message size for specified topic asynchronously.
      参数:
      topic - Topic name
      返回:
      Configuration of bookkeeper persistence policies
      抛出:
      PulsarAdminException - Unexpected error
    • setMaxMessageSize

      @Deprecated void setMaxMessageSize(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

      @Deprecated CompletableFuture<Void> setMaxMessageSizeAsync(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

      @Deprecated void removeMaxMessageSize(String topic) throws PulsarAdminException
      已过时。
      Remove the max message size for specified topic.
      参数:
      topic - Topic name
      抛出:
      PulsarAdminException - Unexpected error
    • removeMaxMessageSizeAsync

      @Deprecated CompletableFuture<Void> removeMaxMessageSizeAsync(String topic)
      已过时。
      Remove the max message size for specified topic asynchronously.
      参数:
      topic - Topic name
    • getMaxConsumers

      @Deprecated Integer getMaxConsumers(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

      @Deprecated CompletableFuture<Integer> getMaxConsumersAsync(String topic)
      已过时。
      Get the max number of consumer for specified topic asynchronously.
      参数:
      topic - Topic name
      返回:
      Configuration of bookkeeper persistence policies
      抛出:
      PulsarAdminException - Unexpected error
    • getMaxConsumers

      @Deprecated Integer getMaxConsumers(String topic, boolean applied) throws PulsarAdminException
      已过时。
      Get the max number of consumer applied for specified topic.
      参数:
      topic -
      applied -
      返回:
      抛出:
      PulsarAdminException
    • getMaxConsumersAsync

      @Deprecated CompletableFuture<Integer> getMaxConsumersAsync(String topic, boolean applied)
      已过时。
      Get the max number of consumer applied for specified topic asynchronously.
      参数:
      topic -
      applied -
      返回:
    • setMaxConsumers

      @Deprecated void setMaxConsumers(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

      @Deprecated CompletableFuture<Void> setMaxConsumersAsync(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

      @Deprecated void removeMaxConsumers(String topic) throws PulsarAdminException
      已过时。
      Remove the max number of consumer for specified topic.
      参数:
      topic - Topic name
      抛出:
      PulsarAdminException - Unexpected error
    • removeMaxConsumersAsync

      @Deprecated CompletableFuture<Void> removeMaxConsumersAsync(String topic)
      已过时。
      Remove the max number of consumer for specified topic asynchronously.
      参数:
      topic - Topic name
    • getDeduplicationSnapshotInterval

      @Deprecated Integer getDeduplicationSnapshotInterval(String topic) throws PulsarAdminException
      已过时。
      Get the deduplication snapshot interval for specified topic.
      参数:
      topic -
      返回:
      抛出:
      PulsarAdminException
    • getDeduplicationSnapshotIntervalAsync

      @Deprecated CompletableFuture<Integer> getDeduplicationSnapshotIntervalAsync(String topic)
      已过时。
      Get the deduplication snapshot interval for specified topic asynchronously.
      参数:
      topic -
      返回:
    • setDeduplicationSnapshotInterval

      @Deprecated void setDeduplicationSnapshotInterval(String topic, int interval) throws PulsarAdminException
      已过时。
      Set the deduplication snapshot interval for specified topic.
      参数:
      topic -
      interval -
      抛出:
      PulsarAdminException
    • setDeduplicationSnapshotIntervalAsync

      @Deprecated CompletableFuture<Void> setDeduplicationSnapshotIntervalAsync(String topic, int interval)
      已过时。
      Set the deduplication snapshot interval for specified topic asynchronously.
      参数:
      topic -
      interval -
      返回:
    • removeDeduplicationSnapshotInterval

      @Deprecated void removeDeduplicationSnapshotInterval(String topic) throws PulsarAdminException
      已过时。
      Remove the deduplication snapshot interval for specified topic.
      参数:
      topic -
      抛出:
      PulsarAdminException
    • removeDeduplicationSnapshotIntervalAsync

      @Deprecated CompletableFuture<Void> removeDeduplicationSnapshotIntervalAsync(String topic)
      已过时。
      Remove the deduplication snapshot interval for specified topic asynchronously.
      参数:
      topic -
      返回:
    • setSubscriptionTypesEnabled

      @Deprecated void setSubscriptionTypesEnabled(String topic, Set<org.apache.pulsar.client.api.SubscriptionType> subscriptionTypesEnabled) throws PulsarAdminException
      已过时。
      Set is enable sub types.
      参数:
      topic -
      subscriptionTypesEnabled - is enable subTypes
      抛出:
      PulsarAdminException - Unexpected error
    • setSubscriptionTypesEnabledAsync

      @Deprecated CompletableFuture<Void> setSubscriptionTypesEnabledAsync(String topic, Set<org.apache.pulsar.client.api.SubscriptionType> subscriptionTypesEnabled)
      已过时。
      Set is enable sub types asynchronously.
      参数:
      topic -
      subscriptionTypesEnabled - is enable subTypes
    • getSubscriptionTypesEnabled

      @Deprecated Set<org.apache.pulsar.client.api.SubscriptionType> getSubscriptionTypesEnabled(String topic) throws PulsarAdminException
      已过时。
      Get is enable sub types.
      参数:
      topic - is topic for get is enable sub types
      返回:
      set of enable sub types Set<org.apache.pulsar.client.api.SubscriptionType>
      抛出:
      PulsarAdminException - Unexpected error
    • getSubscriptionTypesEnabledAsync

      @Deprecated CompletableFuture<Set<org.apache.pulsar.client.api.SubscriptionType>> getSubscriptionTypesEnabledAsync(String topic)
      已过时。
      Get is enable sub types asynchronously.
      参数:
      topic - is topic for get is enable sub types
    • removeSubscriptionTypesEnabled

      @Deprecated void removeSubscriptionTypesEnabled(String topic) throws PulsarAdminException
      已过时。
      Remove subscription types enabled for a topic.
      参数:
      topic - Topic name
      抛出:
      PulsarAdminException - Unexpected error
    • removeSubscriptionTypesEnabledAsync

      @Deprecated CompletableFuture<Void> removeSubscriptionTypesEnabledAsync(String topic)
      已过时。
      Remove subscription types enabled for a topic asynchronously.
      参数:
      topic - Topic name
    • setSubscribeRate

      @Deprecated void setSubscribeRate(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

      @Deprecated CompletableFuture<Void> setSubscribeRateAsync(String topic, SubscribeRate subscribeRate)
      已过时。
      Set topic-subscribe-rate (topics will limit by subscribeRate) asynchronously.
      参数:
      topic -
      subscribeRate - consumer subscribe limit by this subscribeRate
    • getSubscribeRate

      @Deprecated SubscribeRate getSubscribeRate(String topic) throws PulsarAdminException
      已过时。
      Get topic-subscribe-rate (topics allow subscribe times per consumer in a period).
      参数:
      topic -
      抛出:
      PulsarAdminException - Unexpected error
    • getSubscribeRateAsync

      @Deprecated CompletableFuture<SubscribeRate> getSubscribeRateAsync(String topic)
      已过时。
      Get topic-subscribe-rate asynchronously.

      Topic allow subscribe times per consumer in a period.

      参数:
      topic -
    • getSubscribeRate

      @Deprecated SubscribeRate getSubscribeRate(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

      @Deprecated CompletableFuture<SubscribeRate> getSubscribeRateAsync(String topic, boolean applied)
      已过时。
      Get applied topic-subscribe-rate asynchronously.
      参数:
      topic -
    • removeSubscribeRate

      @Deprecated void removeSubscribeRate(String topic) throws PulsarAdminException
      已过时。
      Remove topic-subscribe-rate.

      Remove topic subscribe rate

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

      @Deprecated CompletableFuture<Void> removeSubscribeRateAsync(String topic) throws PulsarAdminException
      已过时。
      Remove topic-subscribe-rate asynchronously.

      Remove topic subscribe rate

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

      org.apache.pulsar.client.api.Message<byte[]> examineMessage(String topic, String initialPosition, long messagePosition) throws PulsarAdminException
      Examine a specific message on a topic by position relative to the earliest or the latest message.
      参数:
      topic - Topic name
      initialPosition - Relative start position to examine message. It can be 'latest' or 'earliest'
      messagePosition - The position of messages (default 1)
      抛出:
      PulsarAdminException
    • examineMessageAsync

      CompletableFuture<org.apache.pulsar.client.api.Message<byte[]>> examineMessageAsync(String topic, String initialPosition, long messagePosition) throws PulsarAdminException
      Examine a specific message on a topic by position relative to the earliest or the latest message.
      参数:
      topic - Topic name
      initialPosition - Relative start position to examine message. It can be 'latest' or 'earliest'
      messagePosition - The position of messages (default 1)
      抛出:
      PulsarAdminException
    • truncate

      void truncate(String topic) throws PulsarAdminException
      Truncate a topic.

      参数:
      topic - topic name
      抛出:
      PulsarAdminException.NotAuthorizedException - Don't have admin permission
      PulsarAdminException - Unexpected error
    • truncateAsync

      CompletableFuture<Void> truncateAsync(String topic)
      Truncate a topic asynchronously.

      The latest ledger cannot be deleted.

      参数:
      topic - topic name
      返回:
      a future that can be used to track when the topic is truncated
    • setReplicatedSubscriptionStatus

      void setReplicatedSubscriptionStatus(String topic, String subName, boolean enabled) throws PulsarAdminException
      Enable or disable a replicated subscription on a topic.
      参数:
      topic -
      subName -
      enabled -
      抛出:
      PulsarAdminException
    • setReplicatedSubscriptionStatusAsync

      CompletableFuture<Void> setReplicatedSubscriptionStatusAsync(String topic, String subName, boolean enabled)
      Enable or disable a replicated subscription on a topic asynchronously.
      参数:
      topic -
      subName -
      enabled -
      返回:
    • getReplicationClusters

      Set<String> getReplicationClusters(String topic, boolean applied) throws PulsarAdminException
      Get the replication clusters for a topic.
      参数:
      topic -
      applied -
      返回:
      抛出:
      PulsarAdminException
    • getReplicationClustersAsync

      CompletableFuture<Set<String>> getReplicationClustersAsync(String topic, boolean applied)
      Get the replication clusters for a topic asynchronously.
      参数:
      topic -
      applied -
      返回:
      抛出:
      PulsarAdminException
    • setReplicationClusters

      void setReplicationClusters(String topic, List<String> clusterIds) throws PulsarAdminException
      Set the replication clusters for the topic.
      参数:
      topic -
      clusterIds -
      抛出:
      PulsarAdminException
    • setReplicationClustersAsync

      CompletableFuture<Void> setReplicationClustersAsync(String topic, List<String> clusterIds)
      Set the replication clusters for the topic asynchronously.
      参数:
      topic -
      clusterIds -
      返回:
      抛出:
      PulsarAdminException
    • removeReplicationClusters

      void removeReplicationClusters(String topic) throws PulsarAdminException
      Remove the replication clusters for the topic.
      参数:
      topic -
      抛出:
      PulsarAdminException
    • removeReplicationClustersAsync

      CompletableFuture<Void> removeReplicationClustersAsync(String topic)
      Remove the replication clusters for the topic asynchronously.
      参数:
      topic -
      返回:
      抛出:
      PulsarAdminException
    • getReplicatedSubscriptionStatus

      Map<String,Boolean> getReplicatedSubscriptionStatus(String topic, String subName) throws PulsarAdminException
      Get replicated subscription status on a topic.
      参数:
      topic - topic name
      subName - subscription name
      返回:
      a map of replicated subscription status on a topic
      抛出:
      PulsarAdminException.NotAuthorizedException - Don't have admin permission
      PulsarAdminException.NotFoundException - Topic does not exist
      PulsarAdminException - Unexpected error
    • getReplicatedSubscriptionStatusAsync

      CompletableFuture<Map<String,Boolean>> getReplicatedSubscriptionStatusAsync(String topic, String subName)
      Get replicated subscription status on a topic asynchronously.
      参数:
      topic - topic name
      返回:
      a map of replicated subscription status on a topic