import org.apache.kafka.streams.scala.StreamsBuilder
import org.apache.kafka.streams.scala._
import ImplicitConversions._
import Serdes._
val builder = new StreamsBuilder
val groupedKStream = builder
.stream[String, String]("events")
.groupByKey
scala> :type groupedKStream
org.apache.kafka.streams.scala.kstream.KGroupedStream[String,String]
KGroupedStream — Basic Stream Aggregations
KGroupedStream
is the abstraction of a grouped record stream that allows Kafka Streams developers for aggregate, count, reduce and windowedBy stream aggregations.
KGroupedStream
is the result of the following aggregate stream operators:
Tip
|
Use Scala API for Kafka Streams to make your Kafka Streams development more pleasant if Scala is your programming language. |
Method | Description |
---|---|
|
Creates a KTable with a given |
|
Creates a KTable with a given Materialized (view of a KeyValueStore) |
|
Creates a KTable with a given |
|
Creates a SessionWindowedKStream with a given |
|
Creates a TimeWindowedKStream with a given Windows window specification |
Note
|
KGroupedStreamImpl is the one and only known implementation of the KGroupedStream Contract in Kafka Streams 2.3.0. |