You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
KAFKA-18013: Add support for duration based offset reset strategy to Kafka Consumer (#17972)
Update AutoOffsetResetStrategy.java to support duration based reset strategy
Update OffsetFetcher related classes and unit tests
Reviewers: Andrew Schofield <[email protected]>, Lianet Magrans <[email protected]>
Copy file name to clipboardexpand all lines: clients/src/main/java/org/apache/kafka/clients/consumer/ConsumerConfig.java
+2
Original file line number
Diff line number
Diff line change
@@ -173,6 +173,8 @@ public class ConsumerConfig extends AbstractConfig {
173
173
"(e.g. because that data has been deleted): " +
174
174
"<ul><li>earliest: automatically reset the offset to the earliest offset" +
175
175
"<li>latest: automatically reset the offset to the latest offset</li>" +
176
+
"<li>by_duration:<duration>: automatically reset the offset to a configured <duration> from the current timestamp. <duration> must be specified in ISO8601 format (PnDTnHnMn.nS). " +
177
+
"Negative duration is not allowed.</li>" +
176
178
"<li>none: throw exception to the consumer if no previous offset is found for the consumer's group</li>" +
177
179
"<li>anything else: throw exception to the consumer.</li></ul>" +
178
180
"<p>Note that altering partition numbers while setting this config to latest may cause message delivery loss since " +
0 commit comments