Skip to content

Commit ec154a3

Browse files
authored
Rephrase replication factor documentation (#3909)
* Fix docs on `RetryableTopic.replicationFactor()` * Rephrase replicationFactor description about broker version Signed-off-by: Seonghyeon Cho <[email protected]> **Auto-cherry-pick to `3.3.x` & `3.2.x`**
1 parent 1c83c44 commit ec154a3

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

spring-kafka/src/main/java/org/springframework/kafka/annotation/RetryableTopic.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@
119119
/**
120120
* The replication factor for the automatically created topics. Expressions must
121121
* resolve to a short or a String that can be parsed as such. Default is -1 to use the
122-
* broker default if the broker is earlier than version 2.4, an explicit value is
122+
* broker default. If the broker is earlier than version 2.4, an explicit value is
123123
* required.
124124
*
125125
* @return the replication factor.

spring-kafka/src/main/java/org/springframework/kafka/retrytopic/RetryTopicConfigurationBuilder.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -432,8 +432,8 @@ public RetryTopicConfigurationBuilder doNotAutoCreateRetryTopics() {
432432
* Configure the topic creation behavior to auto create topics with the provided
433433
* properties.
434434
* @param numPartitions the number of partitions.
435-
* @param replicationFactor the replication factor (-1 to use the broker default if the
436-
* broker is version 2.4 or later).
435+
* @param replicationFactor the replication factor (-1 to use the broker default. If the
436+
* broker is earlier than version 2.4, an explicit value is required).
437437
* @return the builder.
438438
*/
439439
public RetryTopicConfigurationBuilder autoCreateTopicsWith(@Nullable Integer numPartitions, @Nullable Short replicationFactor) {
@@ -447,8 +447,8 @@ public RetryTopicConfigurationBuilder autoCreateTopicsWith(@Nullable Integer num
447447
* properties.
448448
* @param shouldCreate true to auto create.
449449
* @param numPartitions the number of partitions.
450-
* @param replicationFactor the replication factor (-1 to use the broker default if the
451-
* broker is version 2.4 or later).
450+
* @param replicationFactor the replication factor (-1 to use the broker default. If the
451+
* broker is earlier than version 2.4, an explicit value is required).
452452
* @return the builder.
453453
*/
454454
public RetryTopicConfigurationBuilder autoCreateTopics(@Nullable Boolean shouldCreate, @Nullable Integer numPartitions,

0 commit comments

Comments
 (0)