You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/10/28 01:52:59 UTC

[GitHub] [pulsar] codelipenghui commented on a diff in pull request #18212: [improve] [client] Add api to get producer/consumer stats for partition topic

codelipenghui commented on code in PR #18212:
URL: https://github.com/apache/pulsar/pull/18212#discussion_r1007529202


##########
pulsar-client-api/src/main/java/org/apache/pulsar/client/api/ConsumerStats.java:
##########
@@ -114,4 +114,9 @@ public interface ConsumerStats extends Serializable {
      * @return
      */
     Map<Long, Integer> getMsgNumInSubReceiverQueue();
+
+    /**
+     * @return stats for each partition if topic is partitioned topic
+     */
+    Map<String, ConsumerStats> getPartitionStats();

Review Comment:
   Here is not only about partition stats. Users can provide topic lists and topic patterns.
   Is it better to use a new interface `MultiTopicConsumerStats extends ConsumerStats`?
   
   For the producer side, we can have a new interface `PartitionedTopicProducerStats extends ProducerStats`
   
   So that we can add new methods to the `MultiTopicConsumerStats` and `PartitionedTopicProducerStats` such `getStatsForInternalTopics` and `getStatsForPartitions`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org