-
Notifications
You must be signed in to change notification settings - Fork 337
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EnableZeroQueueConsumer Setting Not Functioning Correctly #1276
Comments
Could you please provide a more detailed explanation of the meaning of this sentence? pulsar-client-go/pulsar/consumer_partition.go Line 1492 in 682bf5f
In the current situation, all messages are first distributed to the messageCh , and then data is retrieved from this channel.
|
The expected behavior with EnableZeroQueueConsumer set to true should be as follows: 50 tasks were placed in the queue. Consumer 1: Processed tasks 1-5, but incorrectly buffered tasks 6-20 This behavior contradicts the purpose of EnableZeroQueueConsumer. With this setting enabled, consumers should only fetch tasks as they're ready to process them, without pre-fetching or buffering additional tasks. The current implementation appears to be ignoring this setting, leading to unnecessary buffering and potential issues with task distribution and processing. test code :
|
I've found a temporary solution to my issue by modifying the following line: pulsar-client-go/pulsar/consumer_partition.go Line 1497 in 953d9ea
The modified code now looks like this:
This change appears to address the problem I was experiencing. However, I want to emphasize that this is a temporary fix, and I'm not certain about its broader implications or whether it's the most appropriate long-term solution. Whether this approach aligns with the intended behavior of EnableZeroQueueConsumer. |
Thank you for the clarification; this was something that wasn't considered before. This modification is fine; |
Description
I've encountered an issue with the Pulsar client where setting EnableZeroQueueConsumer: true does not produce the expected behavior. The client continues to perform extra reads into the buffer, which contradicts the purpose of this setting.
Steps to Reproduce
Configure the Pulsar client with EnableZeroQueueConsumer: true
Observe the client's behavior during message consumption
Expected Behavior
When EnableZeroQueueConsumer is set to true, the client should not perform extra reads into the buffer. It should only fetch messages as they are consumed.
Actual Behavior
The client continues to read additional messages into the buffer, despite the EnableZeroQueueConsumer setting being enabled.
Additional Information
I've reviewed the code and I'm confident there's an issue in the implementation of this feature. The extra buffering occurs consistently, regardless of the EnableZeroQueueConsumer setting.
Environment
Pulsar Client Version: v0.13.1
Server : [apachepulsar/pulsar:3.3.1] (docker)
Any assistance in investigating and resolving this issue would be greatly appreciated. Thank you for your time and attention to this matter.
The text was updated successfully, but these errors were encountered: