Dream95 commented on issue #25698: URL: https://github.com/apache/pulsar/issues/25698#issuecomment-4390525946
I think the flakiness is likely caused by `ScalableQueueConsumer.startReceiveLoop()`. `ScalableQueueConsumer` currently keeps calling `v4Consumer.receiveAsync()` in a recursive loop and pushes messages into a local `LinkedTransferQueue` (effectively unbounded). This means even when the user code does not call `receive()` (or does not ack), the internal loop can still keep draining from the underlying v4 consumer and replenishing permits indirectly. As a result: 1. the high-priority consumer may continue to accumulate messages beyond the expected user-level backpressure semantics; 2. overflow to the low-priority consumer becomes timing-dependent ,flaky 3. this may also create memory growth risk on the client side. I think should add backpressure in `ScalableQueueConsumer`. -- 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]
