syhily commented on a change in pull request #17271:
URL: https://github.com/apache/flink/pull/17271#discussion_r708329671



##########
File path: 
flink-connectors/flink-connector-pulsar/src/main/java/org/apache/flink/connector/pulsar/source/enumerator/PulsarSourceEnumerator.java
##########
@@ -200,6 +203,18 @@ private void seekStartPosition(Set<TopicPartition> 
partitions) {
         }
     }
 
+    private ConsumerBuilder<byte[]> consumerBuilder() {
+        ConsumerBuilder<byte[]> builder =
+                createConsumerBuilder(pulsarClient, Schema.BYTES, 
configuration);
+        if (sourceConfiguration.getSubscriptionType() == 
SubscriptionType.Key_Shared) {
+            Range range = TopicRange.createFullRange().toPulsarRange();
+            // Force this to sticky hash range.
+            
builder.keySharedPolicy(KeySharedPolicy.stickyHashRange().ranges(range));
+        }

Review comment:
       I will submit these codes in another PR.




-- 
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: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to