ferenc-csaky commented on code in PR #105:
URL: 
https://github.com/apache/flink-connector-pulsar/pull/105#discussion_r2440786333


##########
flink-connector-pulsar/src/main/java/org/apache/flink/connector/pulsar/source/PulsarSourceBuilder.java:
##########
@@ -590,6 +593,12 @@ public PulsarSource<OUT> build() {
             }
         }
 
+        if (Objects.equals(startCursor, StartCursor.latest())) {

Review Comment:
   nit: `StartCursor.latest().equals(startCursor)` is also null-safe, shorter 
and does not require a util class



##########
flink-connector-pulsar/src/main/java/org/apache/flink/connector/pulsar/source/PulsarSourceOptions.java:
##########
@@ -232,6 +233,13 @@ private PulsarSourceOptions() {
                                             code("StartCursor"))
                                     .build());
 
+    public static final ConfigOption<SubscriptionInitialPosition> 
PULSAR_INITIAL_CURSOR =
+            ConfigOptions.key(SOURCE_CONFIG_PREFIX + "initialCursor")
+                    .enumType(SubscriptionInitialPosition.class)
+                    .defaultValue(SubscriptionInitialPosition.Latest)
+                    .withDescription(
+                            Description.builder().text("Consumer initial 
position.").build());

Review Comment:
   I would add a bit more descriptive text here, e.g.: Initial cursor position 
of the consumer.



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