From: Kai Moritz Date: Mon, 11 Oct 2021 19:53:26 +0000 (+0200) Subject: WIP X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=967435bce9fe4c9089f2d162512c62a44af6cfb1;p=demos%2Fkafka%2Fwordcount WIP --- diff --git a/pom.xml b/pom.xml index 56a2b76..e090dba 100644 --- a/pom.xml +++ b/pom.xml @@ -14,6 +14,7 @@ Wordcount-Query Query stream-processor of the multi-user wordcount-example + 1.10.2 0.33.0 11 2.8.0 @@ -31,6 +32,11 @@ org.apache.kafka kafka-streams + + org.apache.avro + avro + ${avro.version} + org.springframework.boot @@ -81,6 +87,27 @@ + + org.apache.avro + avro-maven-plugin + ${avro.version} + + + generate-sources + + schema + + + ${project.basedir}/src/main/resources/avro + ${project.basedir}/target/generated-sources + PRIVATE + + *.avsc + + + + + diff --git a/src/main/resources/avro/user.avsc b/src/main/resources/avro/user.avsc new file mode 100644 index 0000000..833291b --- /dev/null +++ b/src/main/resources/avro/user.avsc @@ -0,0 +1,23 @@ +{ + "type": "record", + "name": "UserTO", + "namespace": "de.juplo.kafka.wordcount.query", + "fields": [ + { + "name": "username", "type": "string" + }, + { + "name": "firstName", "type": "string", "default": "" + }, + { + "name": "lastName", "type": "string", "default": "" + }, + { "name": "sex", "type": + { + "type": "enum", "name": "SexTO", + "symbols": [ "UNKNOWN", "FEMALE", "MALE", "OTHER" ], "default": "UNKNOWN" + }, + "default": "UNKNOWN" + } + ] +}