February 6, 2018

Kafka Streams. But for Scala

Lightbend's Kafka Streams for Scala is great.

Kafka Streams. But for Scala

I've been using Kafka Streams of at JudoPay for around 18 months now. We use it as part of our real-time fraud detection system and its great.

We tend to prefer Scala to Java at Judo, and use it with our Kafka Streams apps.

I spoke a few months ago at the Kafka London meetup and said in the follow up that my only problem with Kafka Streams is that there is no idiomatic Scala abstraction. Java's SAM lambdas and co/contra-variant types lead to some pretty opaque compiler errors.

Writing a light scala wrapper for Kafka Streams had been on my mind for a while, but procrastination is the drunken father of invention, and I never got around to it.

Lucky we have Lightbend.

They've written an idiomatic Scala wrapper around the Kafka Streams library, including an akka-http implementation of Kafka Streams Interactive Queries.

They've blogged it here: https://developer.lightbend.com/blog/2018-01-05-kafka-streams-scala-goodies-part-1/. Its pretty exciting.