We are using Kafka Streams via Spring Cloud Stream integration. I configured the replication factor to be used across all internal Kafka Streams topics by setting
spring.cloud.stream.kafka.streams.binder.configuration.replication.factor=${REPL_FACTOR}
It works for most repartition/changelog topics used internally by Kafka Streams. However, it looks like this setting has no effect on state store changelog topics that get created manually via Materialized#as(StoreSupplier)
. For those topics I can still see the replication factor is set to default 1. It's also not possible to set it using Materialized#withLoggingEnabled(Map<String, String>)
because this only accepts topic-level configs (replication.factor
is Streams config). Is this a known bug in Kafka Streams? I couldn't find anything. If so, is there a workaround to increase the replication factor for those changelog topics?
We are using Kafka v2.3.1 on the broker side and 2.5.0 on client side.