zhouxinyu commented on code in PR #46:
URL: https://github.com/apache/rocketmq-flink/pull/46#discussion_r992057758


##########
src/main/java/org/apache/rocketmq/flink/source/enumerator/RocketMQSourceEnumerator.java:
##########
@@ -337,16 +339,16 @@ private long getOffsetByMessageQueue(MessageQueue mq) 
throws MQClientException {
             } else {
                 switch (consumerOffsetMode) {
                     case CONSUMER_OFFSET_EARLIEST:
-                        offset = consumer.minOffset(mq);
-                        break;
+                        consumer.seekToBegin(mq);
+                        return -1;
                     case CONSUMER_OFFSET_LATEST:
-                        offset = consumer.maxOffset(mq);
-                        break;
+                        consumer.seekToEnd(mq);
+                        return -1;

Review Comment:
   Return directly with -1, this is a different behavior compared to the old 
version or `CONSUMER_OFFSET_TIMESTAMP`.
   
   It's recommended to unify the behavior.



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