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 2020/09/09 11:22:44 UTC

[GitHub] [pulsar] codelipenghui commented on a change in pull request #8003: support max consumers per subscription on topic level

codelipenghui commented on a change in pull request #8003:
URL: https://github.com/apache/pulsar/pull/8003#discussion_r485534048



##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentDispatcherMultipleConsumers.java
##########
@@ -795,5 +808,35 @@ public PersistentTopic getTopic() {
         return topic;
     }
 
+    /**
+     * Get {@link TopicPolicies} for this topic.
+     * @param topicName
+     * @return TopicPolicies is exist else return null.
+     */
+    private TopicPolicies getTopicPolicies(TopicName topicName) {

Review comment:
       Looks dup with`NonPersistentDispatcherSingleActiveConsumer.java`.

##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentDispatcherSingleActiveConsumer.java
##########
@@ -537,5 +551,35 @@ public void initializeDispatchRateLimiterIfNeeded(Optional<Policies> policies) {
         return disconnectAllConsumers();
     }
 
+    /**
+     * Get {@link TopicPolicies} for this topic.
+     * @param topicName
+     * @return TopicPolicies is exist else return null.
+     */
+    private TopicPolicies getTopicPolicies(TopicName topicName) {

Review comment:
       Same as the above comment, I think we can move this method to the BrokerService?




----------------------------------------------------------------
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.

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