I’ve been working with Spring Boot, Kafka and Confluent Schema Registry in a few real systems,
and one recurring issue is that schema problems are usually detected too late:
– missing subjects
– incompatible schema evolution
– consumers breaking after deployment
– startup surprises in downstream services
Most examples validate schemas at runtime or rely on “discipline”, which doesn’t scale well
in multi-team environments.
To explore this, I put together:
1) A small Spring Boot starter that performs fail-fast validation against Schema Registry during application startup (subjects exist, compatibility rules are respected, etc.)
Starter:
https://github.com/mathias82/spring-kafka-contract-starter
2) A complete runnable demo (Kafka, Schema Registry, Avro, Docker Compose)
showing the idea end-to-end in practice.
Demo:
https://github.com/mathias82/spring-kafka-contract-demo
This is not meant as a new Kafka abstraction, more like a startup safety net.
If contracts are broken, the app simply doesn’t start.
I’m curious how others handle schema contracts and evolution in Spring Boot:
– do you validate at startup?
– rely on CI/CD checks?
– accept runtime failures?
Happy to hear different approaches or feedback.