// Scala API for Kafka Streams
import org.apache.kafka.streams.scala._
import ImplicitConversions._
import Serdes._
val builder = new StreamsBuilder
builder
.stream[String, String]("records")
.groupByKey
.count
.toStream
.to("counts")
val topology = builder.build
val meta = topology.describe
scala> :type meta
org.apache.kafka.streams.TopologyDescription
scala> println(meta.globalStores)
[]
scala> println(meta.subtopologies.size)
1
TopologyDescription — Meta Representation of Topology
TopologyDescription
is the abstraction of meta representations (topology descriptions) that Kafka Streams developers use to know (describe) the global stores and subtopologies of a topology.
Note
|
InternalTopologyBuilder.TopologyDescription is the only available implementation of the TopologyDescription Contract in Kafka Streams. |
TopologyDescription
is available using Topology.describe method.
Method | Description |
---|---|
|
The global stores of a topology |
|
The subtopologies of a topology |