Interface NonPersistentTopics


@Deprecated public interface NonPersistentTopics
Deprecated.
since 2.0. See Topics
  • Method Details

    • getPartitionedTopicMetadata

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

      Get metadata of a partitioned topic.

      Parameters:
      topic - Topic name
      Returns:
      Partitioned topic metadata
      Throws:
      PulsarAdminException
    • getPartitionedTopicMetadataAsync

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

      Get metadata of a partitioned topic asynchronously.

      Parameters:
      topic - Topic name
      Returns:
      a future that can be used to track when the partitioned topic metadata is returned
    • getStats

      Deprecated.
      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
             "connected" : true,              // Whether the replication-subscriber is currently connected locally
           },
           "cluster_2" : {
             "msgRateIn" : 100.0,
             "msgThroughputIn" : 10240.0,
             "msgRateOut" : 100.0,
             "msghroughputOut" : 10240.0,
             "connected" : true,
           }
         },
       }
       
       

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

      Parameters:
      topic - Topic name
      Returns:
      the topic statistics
      Throws:
      PulsarAdminException.NotAuthorizedException - Don't have admin permission
      PulsarAdminException.NotFoundException - Topic does not exist
      PulsarAdminException - Unexpected error
    • getStatsAsync

      Deprecated.
      Get the stats for the topic asynchronously. All the rates are computed over a 1 minute window and are relative the last completed 1 minute period.
      Parameters:
      topic - Topic name
      Returns:
      a future that can be used to track when the topic statistics are returned
    • getInternalStats

      Deprecated.
      Get the internal stats for the topic.

      Access the internal state of the topic

      Parameters:
      topic - Topic name
      Returns:
      the topic statistics
      Throws:
      PulsarAdminException.NotAuthorizedException - Don't have admin permission
      PulsarAdminException.NotFoundException - Topic does not exist
      PulsarAdminException - Unexpected error
    • getInternalStatsAsync

      CompletableFuture<PersistentTopicInternalStats> getInternalStatsAsync(String topic)
      Deprecated.
      Get the internal stats for the topic asynchronously.
      Parameters:
      topic - Topic Name
      Returns:
      a future that can be used to track when the internal topic statistics are returned
    • createPartitionedTopic

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

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

      Parameters:
      topic - Topic name
      numPartitions - Number of partitions to create of the topic
      Throws:
      PulsarAdminException
    • createPartitionedTopicAsync

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

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

      Parameters:
      topic - Topic name
      numPartitions - Number of partitions to create of the topic
      Returns:
      a future that can be used to track when the partitioned topic is created
    • unload

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

      Parameters:
      topic - Topic name
      Throws:
      PulsarAdminException.NotAuthorizedException - Don't have admin permission
      PulsarAdminException.NotFoundException - Topic does not exist
      PulsarAdminException - Unexpected error
    • unloadAsync

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

      Parameters:
      topic - Topic name
      Returns:
      a future that can be used to track when the topic is unloaded
    • getListInBundle

      List<String> getListInBundle(String namespace, String bundleRange) throws PulsarAdminException
      Deprecated.
      Get list of topics exist into given bundle.
      Parameters:
      namespace -
      bundleRange -
      Returns:
      Throws:
      PulsarAdminException
    • getListInBundleAsync

      CompletableFuture<List<String>> getListInBundleAsync(String namespace, String bundleRange)
      Deprecated.
      Get list of topics exist into given bundle asynchronously.
      Parameters:
      namespace -
      bundleRange -
      Returns:
    • getList

      List<String> getList(String namespace) throws PulsarAdminException
      Deprecated.
      Get list of topics exist into given namespace.
      Parameters:
      namespace -
      Returns:
      Throws:
      PulsarAdminException
    • getListAsync

      CompletableFuture<List<String>> getListAsync(String namespace)
      Deprecated.
      Get list of topics exist into given namespace asynchronously.
      Parameters:
      namespace -
      Returns: