Kafka Error INCONSISTENT_TOPIC_ID
Error code 103 · Retriable Broker
The log's topic ID did not match the topic ID in the request.
Common Causes
- A broker's local log has a different topic UUID than what the KRaft controller believes for that topic — typically after restoring a broker from a backup snapshot taken at a different cluster state
- Topic was deleted and recreated while a broker was offline; when the broker came back, its log still has the old topic ID
- Manual manipulation of log files or metadata caused a topic UUID mismatch between the log directory and the cluster metadata
Solutions
- Delete the stale local log directory for the affected topic/partition on the broker and let it replicate fresh from the leader
- If the mismatch is widespread, restore the broker from a consistent snapshot or wipe its data directory and let it resync from scratch
- Investigate with kafka-dump-log.sh on the local log and compare the topic ID in the log metadata against what kafka-topics.sh --describe reports
Diagnostic Commands
# Check topic UUID and metadata
kafka-topics.sh --bootstrap-server localhost:9092 --describe --topic <topic-name> | grep TopicId
# Inspect raw log segment data
kafka-dump-log.sh --files /var/kafka/data/<topic>-<partition>/00000000000000000000.log --print-data-log 2>&1 | head -20
Debugging Kafka errors? Conduktor Console gives you real-time visibility into your cluster. Explore all errors in the Error Decoder.