Closed omercelikceng closed 2 years ago
See the documentation https://docs.spring.io/spring-cloud-stream-binder-kafka/docs/3.2.1/reference/html/spring-cloud-stream-binder-kafka.html#_kafka_binder_properties
spring.cloud.stream.kafka.binder.replicationFactor
The replication factor of auto-created topics if autoCreateTopics is active. Can be overridden on each binding.
f you are using Kafka broker versions prior to 2.4, then this value should be set to at least 1. Starting with version 3.0.8, the binder uses -1 as the default value, which indicates that the broker 'default.replication.factor' property will be used to determine the number of replicas. Check with your Kafka broker admins to see if there is a policy in place that requires a minimum replication factor, if that’s the case then, typically, the default.replication.factor will match that value and -1 should be used, unless you need a replication factor greater than the minimum.
You are setting it to 1
replication-factor: 1
but your brokers require a higher number.
Hi Gary. Thank you for your interest. I set the replication-factor to 3. However it still throws an error. What am I doing wrong?
Sorry Gary. I finally found the problem. This is because you have given min.insync.replicas larger than the replication factor. Sorry for wasting your time. I made a small change in the project. I didn't notice it because I was confused. Should I delete Issue or close?
@omercelikceng I will close the issue. We will keep it for any future reference or others running into the same issue.
The old version(spring-boot-starter-parent : 2.3.4.RELEASE, spring-cloud-dependencies : Hoxton.SR5) works without any errors. It just throws error on kafka broker. But it is not throwing any error in spring boot application. Just I wanted to give information. Thank you for your interest. Thank you so much.
Hello. After I increased the version in my application, I started getting errors. I have 6 active brokers in my Kafka cluster. When I run my application with the old version, I don't get any errors. However, when I run my application with the new version, I get the following error. I have 6 active brokers, but pretend there aren't enough brokers to replicate.
I think it's a bug with version mismatch.
New Project Version : spring-boot-starter-parent : 2.4.13 spring-cloud-dependencies : 2020.0.5
Old Project Version : spring-boot-starter-parent : 2.3.4.RELEASE spring-cloud-dependencies : Hoxton.SR5
Configuration :
Error In Spring Boot App :
Error In Kafka Broker :