ZeroQueueConsumer is not supported with RetryEnable#1391
Conversation
checkArgument(conf.getReceiverQueueSize() > 0,
"Receiver queue size needs to be greater than 0 for Topics Consumer");This assertion disallows the receiver queue size as 0 for a multi-topics consumer. It seems not related to this PR? |
In the Java client, setting In the Go client, if The only difference from the |
There was a problem hiding this comment.
Pull Request Overview
This PR adds validation to prevent the incompatible combination of RetryEnable and EnableZeroQueueConsumer options, maintaining consistency with the Java Pulsar client implementation.
- Adds early validation in the consumer constructor to reject incompatible configuration
- Includes test coverage to verify the validation works correctly
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| pulsar/consumer_impl.go | Adds validation logic to reject RetryEnable + EnableZeroQueueConsumer combination |
| pulsar/consumer_zero_queue_test.go | Adds test case to verify the validation error is properly returned |
Comments suppressed due to low confidence (1)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
(If this PR fixes a github issue, please add
Fixes #<xyz>.)Fixes #1319
Modifications
https://github.com/apache/pulsar/blob/89167308709cf72d3f2731bad1bb30384f80abb4/pulsar-client/src/main/java/org/apache/pulsar/client/impl/MultiTopicsConsumerImpl.java#L148-L149
We need to be consistent with the Java Client;
ZeroQueueConsumerdoes not support use withRetryEnable.Verifying this change
(Please pick either of the following options)
This change is a trivial rework / code cleanup without any test coverage.
(or)
This change is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:
(example:)
Does this pull request potentially affect one of the following parts:
If
yeswas chosen, please highlight the changesDocumentation