The compiler was never what you wanted
You have an orders topic on a Kafka cluster, its values encoded with Avro against a schema in the Schema Registry . You want the orders worth more than fifty euros on a topic of their own, and you have decided to do it with Kafka Streams — a JVM library, your code, your deployment. The schema has five fields: { "type" : "record" , "name" : "Order" , "namespace" : "com.alginte.demo" , "fields" : [ { "name" : "orderId" , "type" : "string" }, { "name" : "customerId" , "type" : "string" }, { "name" : "item" , "type" : "string" }, { "name" : "quantity" , "type" : "int" }, { "name" : "priceEur" , "type" : "double" }]} You want one line of logic over them: quantity * priceEur > 50 . Here is everything standing between that line and a topic of big orders. Seven steps The route Confluent's own examples take, and many projects with them: Get the schema out of the registry and into your repository as an .avsc — or, if your team owns the schema in the repository and publishes it to the registry, the other way round. Whichever copy you call the source, there are now two that can disagree. Add the code generator to your build. Configure it — source and output directories, and the string type. Build , producing Order.java under target/generated-sources . Write the topology against the generated class. Package the application, with the schema, the class and the serde. Deploy it somewhere that runs a JVM. Steps 2 and 3 are this, once — in Maven, though Gradle's equivalent has the same shape: <plugin> <groupId> org.apache.avro </groupId> <artifactId> avro-maven-plugin </artifactId> <version> 1.12.1 </version> <executions><execution> <phase> generate-sources </phase> <goals><goal> schema </goal></goals> <configuration> <sourceDirectory> ${project.basedir}/src/main/avro </sourceDirectory> <!-- without this, string fields generate as CharSequence, not String; Confluent's own examples set it for the same reason --> <stringType> String </stringType> </configuration> </execution></executio