merlimat commented on a change in pull request #634: PIP-3 : Introduce 
message-dispatch rate limiting
URL: https://github.com/apache/incubator-pulsar/pull/634#discussion_r132697173
 
 

 ##########
 File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/Namespaces.java
 ##########
 @@ -811,6 +812,66 @@ public void splitNamespaceBundle(@PathParam("property") 
String property, @PathPa
         }
     }
 
+    @POST
+    @Path("/{property}/{cluster}/{namespace}/dispatchRate")
+    @ApiOperation(value = "Set dispatch-rate throttling for all topics of the 
namespace")
+    @ApiResponses(value = { @ApiResponse(code = 403, message = "Don't have 
admin permission") })
+    public void setDispatchRate(@PathParam("property") String property, 
@PathParam("cluster") String cluster,
+            @PathParam("namespace") String namespace, DispatchRate 
dispatchRate) {
+        log.info("[{}] Set namespace dispatch-rate {}/{}/{}/{}", 
clientAppId(), property, cluster, namespace,
+                dispatchRate);
+        validateSuperUserAccess();
+
+        if (!cluster.equals(Namespaces.GLOBAL_CLUSTER)) {
 
 Review comment:
   It is not necessary to check the cluster here, change will be stored in 
global-zk and the right cluster will pick it up.
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to