-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kafka topic creation uses a wrong configuration #3709
Comments
Feels like a duplicate of #3667. Not sure what else you'd like to hear from us, but you may consider to re-map that |
Adding a new config line to the
|
Also this is a duplication of SO thread: https://stackoverflow.com/questions/79362234/kafka-topic-creation-uses-wrong-configuration. I see that you use See if you can rely on auto-configuration for everything or use custom Really closing as a duplication. |
In what version(s) of Spring for Apache Kafka are you seeing this issue?
Spring Boot 3.4.1 and Spring Kafka 3.3.1
Describe the bug
Following the written doc here the creation of a new Kafka topic during the startup fails.
The
TopicBuilder
uses a wrong configuration while trying to create a new topic. It seems that it uses the default config values (likebootstrap.servers = [localhost:9092]
) despite I have an own config and it fails to create the topic because my config is different.After the startup when I send a message to the topic everything works great and the
KafkaTemplate
uses my configuration.I see there is a configs method on the
TopicBuilder
here, but it expectsMap<String,String>
and I am not able to reuse the config map that I use forDefaultKafkaProducerFactory
which isMap<String, Object>
.To Reproduce
configuration
sender
log
Expected behavior
TopicBuilder
andKafkaTemplate
must use the same configuration.Sample
see above
The text was updated successfully, but these errors were encountered: