ZhaoGuorui666 opened a new pull request, #23546: URL: https://github.com/apache/pulsar/pull/23546
Fixes #23485 ### Motivation After calling `pause()`, there are still messages retained in `incomingMessages` because the internal `consumer `has already pre fetched a message and placed it in `incomingMessages`. When calling pause(), these pre fetched messages are not immediately cleared, causing instability as messages can still be received during testing. ### Modifications A larger `receiverQueueSize` allows more messages to be prefetched and cached, ensuring that messages in the buffer are effectively managed after a pause operation, without causing message interference during testing. In a multi topic consumer environment, the `receiverQueueSize `should be set reasonably. For multi topic consumers, the receiver Queue Size should be large enough to ensure that each internal ConsumerImpl instance can independently perform message prefetching without interfering with each other. receiverQueueSize 1 -> 6 ### Verifying this change  ### Documentation - [ ] `doc` - [ ] `doc-required` - [x] `doc-not-needed` - [ ] `doc-complete` -- 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]
