lhotari commented on pull request #10384:
URL: https://github.com/apache/pulsar/pull/10384#issuecomment-842140533


   > > Is it so that it should be called in both cases, but it's some kind of 
optimization to skip calling it for the other case? If a possible duplicate 
call is the issue, is that something that should be fixed?
   > 
   > @lhotari Yes, since the `rateLimitFunction` is to enable channel autoread, 
called once has the same effect with called twice.
   
   It seems that the rate limiting should be somehow combined when both limits 
`publishThrottlingRateInMsg` and `publishThrottlingRateInByte` are set. I would 
assume that it leads to inconsistent behavior when backpressure is released 
(enabling auto read) only in the `topicPublishRateLimiterOnMessage` rate 
limiter. 
   It feels that the 1 second rate limiting interval would have to be shared 
between the 2 different rate limiters to fix the inconsistencies when both 
limits are set. @aloyszhang WDYT?


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