Is it possible to use AutoOffsetReset: earliest and provide an offset or timestamp to reset to? #356
Answered
by
LGouellec
RossSteele
asked this question in
Q&A
-
Just the question in the title, is it possible to reset to a specific offset or timestamp, or does earliest go to start of the retention period? Thanks |
Beta Was this translation helpful? Give feedback.
Answered by
LGouellec
Aug 6, 2024
Replies: 1 comment
-
Hey @RossSteele , Not by design directly in the application. The If you would like to reset the offset for a given consumer group and partition, you can use the Kafka CLI kafka-consumer-groups.sh --bootstrap-server localhost:9092 --group myConsumerGroup --reset-offsets --to-earliest --topic my_topic -execute You can seek per offset or per timestamp or beginning or latest. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
LGouellec
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey @RossSteele ,
Not by design directly in the application. The
AutoOffsetReset
policy is only used if your consumer group does not have a valid offset committed.If you would like to reset the offset for a given consumer group and partition, you can use the Kafka CLI
kafka-consumer-groups.sh
to reset the offsets :Example :
You can seek per offset or per timestamp or beginning or latest.