-
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
[Bug] Replicated Subscriptions can be created on non-replicated topics #24090
Comments
It look like you enabled the GEO on the namespace. |
@nodece. I did not. Namespaces have two fields in their policies, allowedClusters and replicatedClusters. |
Could you share your data?
|
The namespace Policies (The namespace was created on cluster A with no replication_clusters, but allowed_clusters = ["cluster-a", "cluster-b"] -> The result of the commands you asked to run: /pulsar/bin $ pulsar-admin topics get-replication-clusters persistent://tenant/namespace/topic |
Creating a subscription via the admin API and enabling replication on it via the api on cluster A. Then getting the replication status of the subscription on cluster A results in this output: Getting the replication status of the subscription on cluster B results in this output: |
This is normal. Once you set up the GEO in the topic, it will create the subscription on cluster B. |
But I did not set up geo on the topic. The "cluster-a" on the namespace gets applied automatically when the namespace is created on cluster-a. |
try (Consumer<byte[]> consumer = client.newConsumer()
.topic(topicName)
.subscriptionName(subscriptionName)
.replicateSubscriptionState(false) // Please use false.
.subscribe()) {
}
# disable
bin/pulsar-admin topics set-replicated-subscription-status <topic-name> -s <sub-name> -d
# enable
bin/pulsar-admin topics set-replicated-subscription-status <topic-name> -s <sub-name> -e |
Search before asking
Read release policy
Version
OS- Rhel 9
Pulsar Version - 3.3.1
JDK Version - 17
Minimal reproduce step
What did you expect to see?
An error, as a replicated subscription should not be possible on a non-replicated topic.
What did you see instead?
No error, with the subscription created and working. If I use Pulsar-admin to get the replication status on Cluster A, the result is True.
If I switch to pulsar admin on Cluster B, the subscription doesn't exist.
Anything else?
No response
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: