lhotari commented on code in PR #24423:
URL: https://github.com/apache/pulsar/pull/24423#discussion_r2357671205


##########
pulsar-common/src/main/java/org/apache/pulsar/common/protocol/PulsarDecoder.java:
##########
@@ -121,6 +121,8 @@ public void channelRead(ChannelHandlerContext ctx, Object 
msg) throws Exception
             int cmdSize = (int) buffer.readUnsignedInt();
             cmd.parseFrom(buffer, cmdSize);
 
+            checkRateLimit(cmd);

Review Comment:
   this method `checkRateLimit` is very specific in an abstract class. One 
possible solution would be to remove this here and instead change the 
`messageReceived` method to accept `cmd` as a parameter. The default 
implementation would just delegate to `messageReceived()` without parameters. 
This would keep the abstract class clean while serving the changes you are 
intended to make.



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

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to