I have a topic which receives events with the following info:
key -> orderId (Integer)
value -> {"orderId" : aaa, "productId" : xxx, "userId" : yyy, "state" : "zzz"} (JSON with the whole info of the order)
I want to implement a interactive query to get the full order information by orderId. The idea is be able to get the current state of an order from a materialized view (the Kafka Streams store).
First I create the KStream of the topic:
KStream<Integer, JsonNode> stream = kStreamBuilder.stream(integerSerde, jsonSerde, STREAMING_TOPIC);
Then I create a KTable to assign it to a store. The problem is that apparently I can only create stores where the value is an aggregation, for instance: stream.groupByKey().count("myStore");
The store I need should have the whole order information, not an aggregation. Is this possible?