SpringSpring Kafka Advanced
What is spring.kafka.listener.missing-topics-fatal?
Reference answer
It maps to the container property missingTopicsFatal. When true, it prevents the container from starting if any configured topic is not present on the broker. The default is false (since Spring Kafka 2.3.4, and in Spring Boot's KafkaProperties), so by default the application starts even if a listener's topic is missing. It does not apply if the container listens to a topic pattern (regex). When it is true, topicCheckTimeout (default 30s) is how long to wait for the describeTopics check. Topics can be created at startup by declaring NewTopic beans: with a KafkaAdmin bean (Spring Boot registers one automatically) the missing topics are added to the broker. A common approach in orchestrated environments such as Kubernetes is to pre-create topics through deployment tooling and use true only if you want startup to fail fast when a topic is absent.
Expected key concepts: missingTopicsFatal, container, start, topic pattern, topicCheckTimeout, KafkaAdmin, NewTopic, pre-create
How did that feel?
Your own verdict, not the score. It shows up next to this question in the list, so you can come back to the shaky ones.