You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "chia7712 (via GitHub)" <gi...@apache.org> on 2026/10/06 03:26:02 UTC
Re: [PR] KAFKA-21158: Document/warn about future timestamps allowed by message.timestamp.after.max.ms [kafka]
chia7712 commented on code in PR #23596:
URL: https://github.com/apache/kafka/pull/23596#discussion_r4191240002
##########
storage/src/main/java/org/apache/kafka/storage/internals/log/LogConfig.java:
##########
@@ -529,6 +529,50 @@ public static void validateBrokerLogConfigValues(Map<String, ?> props,
}
}
+ /**
+ * Returns a warning if log.message.timestamp.after.max.ms is above the default and applies (i.e. not LogAppendTime).
+ */
+ public static Optional<String> brokerMessageTimestampAfterMaxMsWarning(long afterMaxMs, TimestampType timestampType) {
+ return messageTimestampAfterMaxMsWarning(
+ ServerLogConfigs.LOG_MESSAGE_TIMESTAMP_AFTER_MAX_MS_CONFIG + " is set to " + afterMaxMs, afterMaxMs, timestampType);
+ }
+
+ /**
+ * Topic-level variant; only warns when the override or the effective timestamp type is new or changed,
+ * so unrelated alters don't repeat it.
+ */
+ public static Optional<String> topicMessageTimestampAfterMaxMsWarning(String topic,
Review Comment:
I'm not convinced users benefit from this warning. The broker can't tell whether the raised value is intentional, so the log line would mostly be noise for users who deliberately set it and whose record timestamps are otherwise "normal". The doc update alone already explains the retention impact. Could we keep this change to the docs?
--
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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org