-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[improve][client] Make replicateSubscriptionState nullable #23757
[improve][client] Make replicateSubscriptionState nullable #23757
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <[email protected]>
b388bc2
to
1f9d5c8
Compare
Signed-off-by: Zixuan Liu <[email protected]>
f56aad3
to
e2b4c99
Compare
@nodece Please check #23769, it seems to be a related new feature. |
) Signed-off-by: Zixuan Liu <[email protected]> (cherry picked from commit 3fce309) Signed-off-by: Zixuan Liu <[email protected]>
Signed-off-by: Zixuan Liu <[email protected]>
Signed-off-by: Zixuan Liu <[email protected]> (cherry picked from commit 3fce309)
Signed-off-by: Zixuan Liu <[email protected]> (cherry picked from commit 3fce309)
) Signed-off-by: Zixuan Liu <[email protected]> (cherry picked from commit bc3a933)
) Signed-off-by: Zixuan Liu <[email protected]> (cherry picked from commit bc3a933)
Motivation
The current implementation of subscription replication relies on consumer control with the following configuration:
By default, the
replicateSubscriptionState
is set tofalse
in theConsumerConfigurationData.java
, which creates a mismatch with theCommandSubscribe
definition, wherereplicate_subscription_state
is optional. To address this, I propose changing the default value ofreplicateSubscriptionState
tonull
, 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
replicateSubscriptionState
type is changed fromboolean
toBoolean
and the default value isnull
in theConsumerConfigurationData.java
. When it is null, it won't set the value to thereplicate_subscription_state
ofCommandSubscribe
.Boolean
instead ofboolean
to match thereplicate_subscription_state
ofCommandSubscribe
.Documentation
doc
doc-required
doc-not-needed
doc-complete