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



##########
File path: 
pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java
##########
@@ -680,6 +680,26 @@
             + " non-backlog consumers as well.")
     private boolean dispatchThrottlingOnNonBacklogConsumerEnabled = false;
 
+    @FieldContext(
+            category = CATEGORY_POLICIES,
+            doc = "Default policy for publishing usage reports to system topic 
is disabled."
+            + "This enables publishing of usage reports"
+    )
+    private boolean resourceUsagePublishToTopic = false;

Review comment:
       Ok, if the mechanism used to exchange the usage information across 
brokers should be pluggable, it better to provide the implementation class name 
such as `resourceExchangeClassName=NonPersistentTopicBasedResourceExchange`? So 
that we can support diverse implementations? 

##########
File path: 
pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java
##########
@@ -680,6 +680,26 @@
             + " non-backlog consumers as well.")
     private boolean dispatchThrottlingOnNonBacklogConsumerEnabled = false;
 
+    @FieldContext(
+            category = CATEGORY_POLICIES,
+            doc = "Default policy for publishing usage reports to system topic 
is disabled."
+            + "This enables publishing of usage reports"
+    )
+    private boolean resourceUsagePublishToTopic = false;
+
+    @FieldContext(
+            category = CATEGORY_POLICIES,
+            doc = "Topic to publish usage reports to if 
resourceUsagePublishToTopic is enabled."
+    )
+    private String resourceUsagePublishTopicName = 
"non-persistent://pulsar/system/resource-usage";

Review comment:
       It should be internal of the resource exchange implementation? Or we can 
add a config such as `resourceExchangeProperties=`, so that this can works for 
other implementations.




-- 
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:
[email protected]


Reply via email to