Issue
In the command line, I can use "--from-beginning" to get all the messages in one topic, but how can I get the same effort when I code a java program ,and I'm using High Level Consumer api.
Solution
while creating the consumer properties you can add
props.put("auto.offset.reset", "smallest");
to start reading from the beginning
Answered By - user2720864 Answer Checked By - Mary Flores (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.