I'm receiving the following exception when trying to integrate kafka with spring boot:
java.lang.IllegalStateException: Topic(s) [pushEvent] is/are not present and missingTopicsFatal is true
Based on this thread I've tried to set the the spring.kafka.listener.missing-topics-fatal property to false. Because I have an jHipster app I added the following configuration into my application.yml:
spring:
kafka:
listener:
missing-topics-fatal: false
Somehow the above config didn't had an effect and I still receive the above exception.
Am I missing something in the yaml config? Do I need to do something additional?
It seems topic you are trying to produce message is not created. You can solve this problem with one of the following options:
Creating topic manually:
bin/kafka-topics.sh --create --bootstrap-server localhost:9092 --replication-factor 1 --partitions 1 --topic test
Enabling auto topic creation with setting auto.create.topics.enable to true in broker configs. (config/server.properties file in broker side)
auto.create.topics.enable: Enable auto creation of topic on the server
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With