Kafka Error STREAMS_INVALID_TOPOLOGY
Error code 130 · Non-retriable Streams
The supplied topology is invalid.
Common Causes
- The Kafka Streams application submitted a topology to the broker (KIP-975 server-side topology management) that fails validation — e.g., contains cycles, references non-existent topics, or has invalid task configurations.
- Topology definition includes operations not supported by the target broker version (e.g., using a DSL feature that requires a newer metadata version than what the cluster has finalized).
- Incorrect topology serialization: the topology was serialized with a format that the broker's topology validator cannot parse, possibly due to a version mismatch between the Streams client and the broker.
Solutions
- Enable Streams topology validation locally before submitting: run `StreamsBuilder.build()` and call `Topology.describe()` to inspect the topology graph for structural issues before it reaches the broker.
- Check broker logs for the specific validation error message accompanying `STREAMS_INVALID_TOPOLOGY` — it will identify the exact issue (cycle, missing topic, unsupported operation). Fix the Streams DSL code accordingly.
- Ensure the Kafka Streams client version is compatible with the broker's finalized metadata version. Use `kafka-features.sh describe` to check the cluster's metadata version and cross-reference with Streams release notes.
Diagnostic Commands
# Check finalized feature versions in cluster
kafka-features.sh --bootstrap-server localhost:9092 describe
# Look for topology events in logs
grep 'STREAMS_INVALID_TOPOLOGY\|topology validation\|StreamsTopology' /var/log/kafka/server.log | tail -50Related APIs
This error can be returned by: StreamsGroupHeartbeat
Debugging Kafka errors? Conduktor Console gives you real-time visibility into your cluster. Explore all errors in the Error Decoder.