kotka-streams-extensions

Contains the basic extension functions to make Kafka Streams more Kotlin-esque.

implementation("dev.adamko.kotka:kotka-streams-extensions:$kotkaVersion")
import dev.adamko.kotka.extensions.tables.*
import dev.adamko.kotka.extensions.streams.*
import dev.adamko.kotka.extensions.*

data class MusicalBand(
val name: String,
val memberNames: List<String>,
)

builder.stream<String, MusicalBand>("musical-bands")
.flatMap("band-member-names-to-band-name") { _: String, band: MusicalBand ->
band.memberNames.map { memberName -> memberName to band.name }
}
.groupByKey(groupedAs("map-of-band-member-to-band-names"))

Packages

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard