From ab71c56973518bac8e1868eccdc40b17d7da35c1 Mon Sep 17 00:00:00 2001 From: Okada Haruki Date: Fri, 14 Jul 2023 12:14:31 +0900 Subject: [PATCH] KAFKA-12261: Mention about potential delivery loss on increasing partition when auto.offset.reset = latest (#10167) Splitting partitions while setting auto.offset.reset to latest may cause message delivery loss, but users might not be aware about that since currently it isn't documented anywhere. Reviewers: Luke Chen --- .../apache/kafka/clients/consumer/ConsumerConfig.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/clients/src/main/java/org/apache/kafka/clients/consumer/ConsumerConfig.java b/clients/src/main/java/org/apache/kafka/clients/consumer/ConsumerConfig.java index ec94748221b..6a56ba5a1cc 100644 --- a/clients/src/main/java/org/apache/kafka/clients/consumer/ConsumerConfig.java +++ b/clients/src/main/java/org/apache/kafka/clients/consumer/ConsumerConfig.java @@ -149,7 +149,14 @@ public class ConsumerConfig extends AbstractConfig { * auto.offset.reset */ public static final String AUTO_OFFSET_RESET_CONFIG = "auto.offset.reset"; - public static final String AUTO_OFFSET_RESET_DOC = "What to do when there is no initial offset in Kafka or if the current offset does not exist any more on the server (e.g. because that data has been deleted): "; + public static final String AUTO_OFFSET_RESET_DOC = "What to do when there is no initial offset in Kafka or if the current offset does not exist any more on the server " + + "(e.g. because that data has been deleted): " + + "" + + "

Note that altering partition numbers while setting this config to latest may cause message delivery loss since " + + "producers could start to send messages to newly added partitions (i.e. no initial offsets exist yet) before consumers reset their offsets."; /** * fetch.min.bytes