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



##########
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:
       This is a workaround for the current pulsar release.
   The related issue is described in 
https://github.com/apache/pulsar/pull/12035 and 
https://issues.apache.org/jira/browse/FLINK-24283




-- 
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