com-poorbar opened a new pull request #12792: URL: https://github.com/apache/pulsar/pull/12792
Hi @codelipenghui can you please take a look? @hangc0276 Fixes #6555 * Send Key hash range change events to consumers in Key_Shared subscription Master Issue: #4077 ### Motivation * feature: Send Key hash range change events to consumers in Key_Shared subscription. ### Modifications * [ConsumerEventListener](https://github.com/apache/pulsar/blob/6704f12104219611164aa2bb5bbdfc929613f1bf/pulsar-client-api/src/main/java/org/apache/pulsar/client/api/ConsumerEventListener.java) Add a new method `void keySharedRuleChanged(Consumer<?> consumer, Predicate<String> keyPredicate) ` * Edit this three file. in method `addConsumer`, `removeComsumer`, invoke `consumer.notifyActiveConsumerChange` - [ConsistentHashingStickyKeyConsumerSelector](https://github.com/apache/pulsar/blob/master/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ConsistentHashingStickyKeyConsumerSelector.java) - [HashRangeExclusiveStickyKeyConsumerSelector](https://github.com/apache/pulsar/blob/master/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/HashRangeExclusiveStickyKeyConsumerSelector.java) - [HashRangeAutoSplitStickyKeyConsumerSelector](https://github.com/apache/pulsar/blob/master/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/HashRangeAutoSplitStickyKeyConsumerSelector.java) ### Verifying this change * [ConsumerEventListener](https://github.com/apache/pulsar/blob/6704f12104219611164aa2bb5bbdfc929613f1bf/pulsar-client-api/src/main/java/org/apache/pulsar/client/api/ConsumerEventListener.java) added api : `void keySharedRuleChanged(Consumer<?> consumer, Predicate<String> keyPredicate) ` * [StickyKeyConsumerPredicate]https://github.com/apache/pulsar/blob/master/pulsar-client/src/main/java/org/apache/pulsar/client/impl/StickyKeyConsumerPredicate.java. method: `encode()`, "decode()" is not enough grace * [PulsarApi](https://github.com/apache/pulsar/blob/master/pulsar-common/src/main/proto/PulsarApi.proto) compatible with old-versions ### Does this pull request potentially affect one of the following parts: * consumer sub-type: failover * stream api -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
