[
https://issues.apache.org/jira/browse/KAFKA-8825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16920499#comment-16920499
]
Guozhang Wang commented on KAFKA-8825:
--------------------------------------
I think that the most general solution here could be exposing an
`OffsetResetPolicy` interface so that any user customized logic can be applied,
this is best in expressiveness, but may also open the door for buggy
implementations.
Another way is to follow the pattern that reset tools is designed, i.e. to
expose a pre-defined list of options, such as the table listed in
https://cwiki.apache.org/confluence/display/KAFKA/KIP-122%3A+Add+Reset+Consumer+Group+Offsets+tooling
(both consumer and streams reset tooling actually follows this). Personally
I'd prefer to do this.
> Add option to reset consumer offset by relative time
> ----------------------------------------------------
>
> Key: KAFKA-8825
> URL: https://issues.apache.org/jira/browse/KAFKA-8825
> Project: Kafka
> Issue Type: Improvement
> Reporter: Jason Gustafson
> Priority: Major
> Labels: needs-kip
>
> When the consumer first initializes its position or when it encounters an
> offset out of range error, we have two automatic reset policies: earliest and
> latest. With longer retention times, the earliest reset option is often too
> expensive and the latest reset requires more time to build recent context.
> Users can also set an auto reset policy of "none" and handle it themselves,
> but it may be useful to have a configurable option between earliest and
> latest. So a user can reset to one day ago or one hour ago for example. Would
> this be useful?
--
This message was sent by Atlassian Jira
(v8.3.2#803003)