I would like to build a program that reprocesses data in Kafka based on timestamp of data without affecting the working consumers' offset.
So I did some research and got a chance to see an StackOverFlow answer similar to my situation. https://stackoverflow.com/a/50405704/7034612
However, I'm still not sure if the code written in above answer will affect the currently working consumers' offset. If the restoring process affects the offsets of currently woking consumers, it will mess up the whole program.
You can create a new consumer (as I understand, the "reprocessing logic" will use some kind of consumer anyway) that belongs to a different consumer group.
Consumer groups in kafka maintain their own offset for each partition it processes, so it won't affect the consumers that have already started processing.
You can read about consumer groups here
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.