-
Notifications
You must be signed in to change notification settings - Fork 11.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Code comments of updateConsumeOffset() should be corrected #7489
Comments
@joeCarf Thanks for your reply :) There is no difference in the implementations of method updateOffset() between LocalFileOffsetStore and RemoteBrokerOffsetStore. The codes of updateOffset() in RemoteBrokerOffsetStore (Clustering mode as you said) are as follows: As per the code, I can not found the interaction between client and broker. Therefore, I still think the comment should be corrected. You are right with the fact that the scheduled service would update offset from client memory to broker disk. However, that action is not directly to update offset to broker. |
@tensory2022 |
I never doubt the offset will be updated to broker, what I care is whether it is done by the method updateConsumeOffset(). If not, the code comment should be corrected. In additon, you might need to think over this point: "而LocalFileOffsetStore中只会写到本地文件中" . Whether you use LocalFileOffsetStore or RemoteBrokerOffsetStore, the offset will be synchronized to broker by a scheduled service which runs every 10 seconds. I hope you understand what I'm saying, thank you~ |
i get your point, and i will submit a pr to enhance it. btw, i didn't find the |
plz take a look at this pr #7490 |
@joeCarf Thanks for your PR. Hope it will be merged soon. The code you require is at: org.apache.rocketmq.client.impl.factory.MQClientInstance. |
Search before creation
Documentation Related
[org/apache/rocketmq/example/simple/PullConsumer.java]
https://github.com/apache/rocketmq/blob/develop/example/src/main/java/org/apache/rocketmq/example/simple/PullConsumer.java
consumer.updateConsumeOffset() uses the function of updateOffset() in OffsetStore interface here:
org/apache/rocketmq/client/consumer/store/OffsetStore.java
In example, the comments show "//update offset to broker" and the interface class code shows "Update the offset,store it in memory".
Or one of the two comments might be wrong. Please correct me if I misunderstood them.
Are you willing to submit PR?
The text was updated successfully, but these errors were encountered: