zhouxinyu commented on code in PR #46: URL: https://github.com/apache/rocketmq-flink/pull/46#discussion_r992088138
########## src/main/java/org/apache/rocketmq/flink/legacy/RocketMQSourceFunction.java: ########## @@ -404,8 +380,7 @@ private long getMessageQueueOffset(MessageQueue mq) throws MQClientException { private void updateMessageQueueOffset(MessageQueue mq, long offset) throws MQClientException { offsetTable.put(mq, offset); if (!enableCheckpoint) { - consumer.updateConsumeOffset(mq, offset); - consumer.getOffsetStore().persist(consumer.queueWithNamespace(mq)); + consumer.getOffsetStore().updateOffset(mq, offset, false); Review Comment: It depends. The consumer will persist the offsets periodically, even if we only call `updateOffset`. The `persist` call is heavy, each call will trigger a RPC. So, if the updateMessageQueueOffset already batched some requests, `persist` is more suitable. If not and we can tolerate redundant messages in some abnormal cases, updateOffset is enough. -- 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: dev-unsubscr...@rocketmq.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org