Skip to content

Commit

Permalink
Lower the replication factor for transactions topic on EmbeddedKafka
Browse files Browse the repository at this point in the history
  • Loading branch information
Dltmd202 committed Oct 27, 2024
1 parent df61740 commit b1801a9
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
* @author Oleg Artyomov
* @author Sergio Lourenco
* @author Pawel Lozinski
* @author Dltmd202
* @author Seonghwan Lee
* @since 1.3
*/
class EmbeddedKafkaContextCustomizer implements ContextCustomizer {
Expand Down Expand Up @@ -122,7 +122,7 @@ public void customizeContext(ConfigurableApplicationContext context, MergedConte
}
}

properties.putIfAbsent(TRANSACTION_STATE_LOG_REPLICATION_FACTOR, String.valueOf(Math.min(3, embeddedKafka.value())));
properties.putIfAbsent(TRANSACTION_STATE_LOG_REPLICATION_FACTOR, String.valueOf(Math.min(3, embeddedKafka.count())));

embeddedKafkaBroker.brokerProperties((Map<String, String>) (Map<?, ?>) properties);
if (StringUtils.hasText(this.embeddedKafka.bootstrapServersProperty())) {
Expand Down

0 comments on commit b1801a9

Please sign in to comment.