pulsar
pulsar copied to clipboard
Dispatch rate limiting overshoots the message rate with batched messages
AbstractBaseDispatcher.applyDispatchRateLimitsToReadLimits caps the number of entries to read using the available message-rate permits. With batching, each entry holds many messages, so a single read can dispatch several times the configured msg/s before the limiter catches up.
Earlier attempt: #18553.
Hi @merlimat, I'm working on a fix for this to scale the entry read limits using average messages per entry when batching is enabled.