// Note two percent signs (%%) to encode Scala version libraryDependencies += "org.apache.kafka" %% "kafka-streams-scala" % "2.3.0"
Scala API for Kafka Streams
Scala API for Kafka Streams is a separate Kafka Streams module (a Scala library) that acts as a wrapper over the existing Java API for Kafka Streams.
The Scala API is available in
As a separate Scala library you have to define the dependency in
The Scala API for Kafka Streams defines Scala-friendly types that wrap the corresponding Kafka Streams types and simply delegate all method calls to the underlying Java object with the purpose of making it much more expressive, with less boilerplate and more succinct.
import org.apache.kafka.streams.scala._ import ImplicitConversions._ import Serdes._
You could also use
Serdes when defining
import org.apache.kafka.streams.scala.Serdes._ Serdes.String.getClass.getName
|Scala API for Kafka Streams was added in Kafka Streams 2.0.0 as KAFKA-6670 Implement a Scala wrapper library for Kafka Streams.|