-
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
Consumer cannot consume messages when key_shared mode and subscriptionKeySharedUseConsistentHashing #10750
Comments
1 task
eolivelli
changed the title
Consumer cannot consume messages when key_shared mode
Consumer cannot consume messages when key_shared mode and ConsistentHashingStickyKeyConsumerSelector
Jan 27, 2022
2 tasks
Perhaps this is related to #13965 ? |
eolivelli
changed the title
Consumer cannot consume messages when key_shared mode and ConsistentHashingStickyKeyConsumerSelector
Consumer cannot consume messages when key_shared mode and subscriptionKeySharedUseConsistentHashing
Jan 27, 2022
No, it's not related to that (and #13965 is just a test issue, not a code issue). The consumer name is expected to be unique (eg: if you don't pass one, it will be auto-generated). Having said that, the check here is wrong, as we should compare the consumer instance and not just the name. |
Nicklee007
pushed a commit
to Nicklee007/pulsar
that referenced
this issue
Apr 20, 2022
…r with consistent hashing (apache#13991) ### Motivation Fixes apache#10750 When removing consumers from the key-shared selector based on the consistent hashing, we were removing by consumer name, although there can be duplicated consumer names (even though is not recommended).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Key_shared mode is configured as ConsistentHashingStickyKeyConsumerSelector, When I use three consumers with the same consumerName, if one consumer is closed, the other two consumers will no longer be able to consume messages.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The other two consumers can continue to consume new messages(Refer to step 7 above).
Additional context
pulsar/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ConsistentHashingStickyKeyConsumerSelector.java
Line 93 in e19f647
I think the problem is due to the above code, which removes all consumers with the same name.
The text was updated successfully, but these errors were encountered: