peterxcli commented on code in PR #18096:
URL: https://github.com/apache/kafka/pull/18096#discussion_r1875313096
##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/GroupConfig.java:
##########
@@ -53,8 +50,14 @@ public final class GroupConfig extends AbstractConfig {
public static final String SHARE_RECORD_LOCK_DURATION_MS_CONFIG =
"share.record.lock.duration.ms";
public static final String SHARE_AUTO_OFFSET_RESET_CONFIG =
"share.auto.offset.reset";
- public static final String SHARE_AUTO_OFFSET_RESET_DEFAULT =
ShareGroupAutoOffsetReset.LATEST.toString();
- public static final String SHARE_AUTO_OFFSET_RESET_DOC = "The strategy to
initialize the share-partition start offset.";
+ public static final String SHARE_AUTO_OFFSET_RESET_DEFAULT =
ShareGroupAutoOffsetResetStrategy.LATEST.name();
+ public static final String SHARE_AUTO_OFFSET_RESET_DOC = "The strategy to
initialize the share-partition start offset. " +
+ "<ul><li>earliest: automatically reset the offset to the earliest
offset" +
+ "<li>latest: automatically reset the offset to the latest offset</li>"
+
+ "<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). " +
+ "Negative duration is not allowed.</li>" +
+ "<li>anything else: throw exception to the share consumer.</li></ul>";
Review Comment:
I think we should align with the documentation for consistency between this
and `ConsumerConfig`:
https://github.com/apache/kafka/blob/b9745b160cf7b2bc2a02b11c75fa86d9e9eaf5b4/clients/src/main/java/org/apache/kafka/clients/consumer/ConsumerConfig.java#L172-L181
However, I’m uncertain about whether we should include the following note at
the end:
```
<p>Note that altering partition numbers while setting this config to
'latest' may cause message delivery loss since
producers could start sending messages to newly added partitions (i.e., no
initial offsets exist yet) before consumers reset their offsets."
```
What are your thoughts on this?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]