kafka
configuration_error
ai_generated
true
org.apache.kafka.common.errors.TimeoutException: Topic my_topic not present in metadata after 60000 ms
ID: kafka/topic-not-in-metadata
88%Fix Rate
90%Confidence
3Evidence
2023-01-01First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 3 | active | — | — | — |
Root Cause
Producer/consumer cannot find topic. Topic does not exist and auto-creation is disabled, or bootstrap servers are wrong.
genericWorkarounds
-
92% success Create the topic explicitly before producing/consuming
kafka-topics.sh --create --topic my_topic --bootstrap-server localhost:9092 --partitions 3 --replication-factor 1
-
90% success Verify bootstrap servers are correct and reachable
kafka-broker-api-versions.sh --bootstrap-server localhost:9092
-
85% success Check topic exists with list command
kafka-topics.sh --list --bootstrap-server localhost:9092
Dead Ends
Common approaches that don't work:
-
Set auto.create.topics.enable=true in production
72% fail
Auto-creation leads to typo-induced phantom topics. Create topics explicitly in production.
-
Connect directly to a broker instead of using bootstrap servers
80% fail
Direct broker connection bypasses cluster metadata; breaks when broker changes or cluster rebalances