tisonkun commented on code in PR #19972:
URL: https://github.com/apache/flink/pull/19972#discussion_r944089759


##########
flink-connectors/flink-connector-pulsar/src/main/java/org/apache/flink/connector/pulsar/source/reader/split/PulsarOrderedPartitionSplitReader.java:
##########
@@ -91,8 +91,15 @@ protected void startConsumer(PulsarPartitionSplit split, 
Consumer<byte[]> consum
                     initialPosition = nextMessageId(latestConsumedId);
                 }
 
-                consumer.seek(initialPosition);
-            } catch (PulsarClientException e) {
+                // Remove Consumer.seek() here for waiting for 
pulsar-client-all 2.12.0
+                // See https://github.com/apache/pulsar/issues/16757 for more 
details.
+                pulsarAdmin
+                        .topics()
+                        .resetCursor(
+                                split.getPartition().getFullTopicName(),
+                                sourceConfiguration.getSubscriptionName(),
+                                initialPosition);
+            } catch (PulsarAdminException e) {

Review Comment:
   Cool.
   
   It seems CI failed on Kafka tests. But you may retrigger it and we can merge 
this one once CI gives green.



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

Reply via email to