[improve][client] Make replicateSubscriptionState nullable#23757
Merged
nodece merged 2 commits intoapache:masterfrom Dec 20, 2024
Merged
[improve][client] Make replicateSubscriptionState nullable#23757nodece merged 2 commits intoapache:masterfrom
nodece merged 2 commits intoapache:masterfrom
Conversation
lhotari
approved these changes
Dec 20, 2024
Member
lhotari
left a comment
There was a problem hiding this comment.
This adjustment would enhance flexibility in managing subscription replication policies, such as applying the policy that comes from the namespace or topic level, which streamlines the configuration of subscription replication behavior. This feature is in progress.
This will be a useful feature.
pulsar-client/src/main/java/org/apache/pulsar/client/impl/conf/ConsumerConfigurationData.java
Show resolved
Hide resolved
Signed-off-by: Zixuan Liu <nodeces@gmail.com>
b388bc2 to
1f9d5c8
Compare
Signed-off-by: Zixuan Liu <nodeces@gmail.com>
f56aad3 to
e2b4c99
Compare
lhotari
approved these changes
Dec 20, 2024
Member
@nodece Please check #23769, it seems to be a related new feature. |
Member
Author
Open
4 tasks
nodece
added a commit
to ascentstream/pulsar
that referenced
this pull request
Dec 25, 2024
) Signed-off-by: Zixuan Liu <nodeces@gmail.com> (cherry picked from commit 3fce309) Signed-off-by: Zixuan Liu <nodeces@gmail.com>
nodece
added a commit
that referenced
this pull request
Dec 25, 2024
Signed-off-by: Zixuan Liu <nodeces@gmail.com>
4 tasks
nodece
added a commit
that referenced
this pull request
Dec 30, 2024
Signed-off-by: Zixuan Liu <nodeces@gmail.com> (cherry picked from commit 3fce309)
nodece
added a commit
that referenced
this pull request
Dec 30, 2024
Signed-off-by: Zixuan Liu <nodeces@gmail.com> (cherry picked from commit 3fce309)
nikhil-ctds
pushed a commit
to datastax/pulsar
that referenced
this pull request
Dec 31, 2024
) Signed-off-by: Zixuan Liu <nodeces@gmail.com> (cherry picked from commit bc3a933)
srinath-ctds
pushed a commit
to datastax/pulsar
that referenced
this pull request
Dec 31, 2024
) Signed-off-by: Zixuan Liu <nodeces@gmail.com> (cherry picked from commit bc3a933)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
The current implementation of subscription replication relies on consumer control with the following configuration:
By default, the
replicateSubscriptionStateis set tofalsein theConsumerConfigurationData.java, which creates a mismatch with theCommandSubscribedefinition, wherereplicate_subscription_stateis optional. To address this, I propose changing the default value ofreplicateSubscriptionStatetonull, aligning it with the optional nature of the field inCommandSubscribe.This adjustment would enhance flexibility in managing subscription replication policies, such as applying the policy that comes from the namespace or topic level, which streamlines the configuration of subscription replication behavior. This feature is in progress.
These changes are compatible with both the old and new versions, there won't be any breaking changes.
Modifications
replicateSubscriptionStatetype is changed frombooleantoBooleanand the default value isnullin theConsumerConfigurationData.java. When it is null, it won't set the value to thereplicate_subscription_stateofCommandSubscribe.Booleaninstead ofbooleanto match thereplicate_subscription_stateofCommandSubscribe.Documentation
docdoc-requireddoc-not-neededdoc-complete