[C++] Fix the consumer configuration inconsistency with Java client #14070
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
#13627 supports chunking messages for C++ client. However, the consumer configuration
AutoOldestChunkedMessageOnQueueFullhas a typo that it doesn't contain theAck. See the corresponding Java configuration:pulsar/pulsar-client-api/src/main/java/org/apache/pulsar/client/api/ConsumerBuilder.java
Line 733 in d111476
In addition, the default value of
maxPendingChunkedMessagesis 10 in Java client implementation but 100 in JavaDocs. The C++ client followed the JavaDocs and set the default value ofmaxPendingChunkedMessages100. But it's better to keep the consistency with Java client's implementation instead of the wrong JavaDocs.Since #13627 is not included in any release now, we should include this fix before 2.10.0 release.
Modifications
setAutoOldestChunkedMessageOnQueueFulltosetAutoAckOldestChunkedMessageOnQueueFull.isAutoOldestChunkedMessageOnQueueFulltoisAutoAckOldestChunkedMessageOnQueueFull.maxPendingChunkedMessageto 10.Verifying this change
This change is a trivial rework / code cleanup without any test coverage.
Does this pull request potentially affect one of the following parts:
If
yeswas chosen, please highlight the changes