From: Kai Moritz Date: Sat, 15 Jun 2024 05:34:30 +0000 (+0200) Subject: query: 2.0.0 - (GREEN) Explicitly specifed the missing serde-config X-Git-Tag: popular-on-query~7 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=3ba64ce6decf9343fe689bfb687a9b234cd47ebf;p=demos%2Fkafka%2Fwordcount query: 2.0.0 - (GREEN) Explicitly specifed the missing serde-config --- diff --git a/src/main/java/de/juplo/kafka/wordcount/query/QueryStreamProcessor.java b/src/main/java/de/juplo/kafka/wordcount/query/QueryStreamProcessor.java index 0898e88..e075eb7 100644 --- a/src/main/java/de/juplo/kafka/wordcount/query/QueryStreamProcessor.java +++ b/src/main/java/de/juplo/kafka/wordcount/query/QueryStreamProcessor.java @@ -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 .as(rankingStoreSupplier)