query: 2.0.0 - (GREEN) Explicitly specifed the missing serde-config query-2.0.0
authorKai Moritz <kai@juplo.de>
Sat, 15 Jun 2024 05:34:30 +0000 (07:34 +0200)
committerKai Moritz <kai@juplo.de>
Sun, 16 Jun 2024 19:34:04 +0000 (21:34 +0200)
src/main/java/de/juplo/kafka/wordcount/query/QueryStreamProcessor.java

index bf27e2d..3a1665f 100644 (file)
@@ -5,10 +5,7 @@ import jakarta.annotation.PreDestroy;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.kafka.common.serialization.Serdes;
 import org.apache.kafka.streams.*;
-import org.apache.kafka.streams.kstream.Consumed;
-import org.apache.kafka.streams.kstream.KStream;
-import org.apache.kafka.streams.kstream.KTable;
-import org.apache.kafka.streams.kstream.Materialized;
+import org.apache.kafka.streams.kstream.*;
 import org.apache.kafka.streams.state.HostInfo;
 import org.apache.kafka.streams.state.KeyValueBytesStoreSupplier;
 import org.apache.kafka.streams.state.QueryableStoreTypes;
@@ -74,7 +71,8 @@ public class QueryStreamProcessor
                                .join(users, (ranking, user) -> UserRanking.of(
                                                user.getFirstName(),
                                                user.getLastName(),
-                                               ranking.getEntries()))
+                                               ranking.getEntries()),
+                                               Joined.keySerde(Serdes.String()))
                                .toTable(
                                                Materialized
                                                                .<String, UserRanking>as(rankingStoreSupplier)