KeyValueBytesStoreSupplier storeSupplier = Stores.lruMap("counts", 10);
StreamsBuilder builder = new StreamsBuilder();
KStream<String, String> stream = builder.stream("patient-events");
stream
.groupByKey()
.count(
Materialized.<String, Long>as(storeSupplier)
.withKeySerde(Serdes.String())
.withValueSerde(Serdes.Long()));
return builder.build();
Created
December 23, 2020 23:07
-
-
Save mitch-seymour/3b6f798e53d76a5e33eb36cf46639169 to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment