Skip to content
Scala helper modules for operating the Apache Kafka client library (0.9.x - 2.1.0)
Branch: master
Clone or download

Latest commit

ctoomey Stale offsets fix in Akka actor (#159)
* Stale offset fix

* Stale offsets test

* Stale offsets test

* Stale offsets test

* Stale offsets test

* Verify stale offsets fix
Latest commit 5f22aee Feb 17, 2020


Type Name Latest commit message Commit time
Failed to load latest commit information.
akka Stale offsets fix in Akka actor (#159) Feb 17, 2020
client Fix compiler warning & thread was not terminated (#137) Apr 24, 2018
examples Support of Kafka (#117) Jul 4, 2017
project Update to scala 2.13, kafka 2.4.0 (#156) Dec 24, 2019
testkit Remove unused parameter (#155) Feb 17, 2020
.gitignore Update docs Feb 22, 2016
.jvmopts Bump version (#132) Feb 26, 2018
.sbtopts Add sbt opts Aug 3, 2018
.travis.yml Bump version (#144) Aug 3, 2018
LICENSE.txt Update to MIT license Jan 29, 2016 Update to 2.3.1 (#153) Nov 26, 2019
build.sbt Stale offsets fix in Akka actor (#159) Feb 17, 2020
version.sbt Update to scala 2.13, kafka 2.4.0 (#156) Dec 24, 2019

Scala support for Apache Kafka's Java client library 0.9.0.x - 2.3.1

Join the chat at Build status Dependencies codecov

This project comprises a few helper modules for operating the Kafka Java Client Driver in a Scala codebase.


These modules are production ready, actively maintained and are used in a large scale production system.

Artifact Resolution

To resolve any of the modules, add the following resolver to the build.sbt:

resolvers += Resolver.bintrayRepo("cakesolutions", "maven")


Scala Kafka Client

A thin Scala wrapper over the official Apache Kafka Java Driver. This module is useful for integrating with Kafka for message consumption/delivery, but provides some helpers for convenient configuration of the driver and usage from Scala. Minimal 3rd party dependencies are added in addition to the Kafka client.

For configuration and usage, see the Wiki: Scala Kafka Client Guide

SBT library dependency:

libraryDependencies += "net.cakesolutions" %% "scala-kafka-client" % "2.3.1"

Akka Integration

This module provides a configurable asynchronous and non-blocking Kafka Consumer and Producer Actor implementations to support high performance, parallel custom stream processing in an Akka application. These components are specifically intended for use cases where high performance and scalable message processing is required with specific concern for message delivery guarantees and resilience.

For configuration and usage, see the Wiki: Akka Integration

SBT library dependency:

libraryDependencies += "net.cakesolutions" %% "scala-kafka-client-akka" % "2.3.1"


The TestKit module provides some tools to support integration testing of client service code that depends on a running Kafka Server. Helps the setup of an in-process Kafka and Zookeeper server.

For usage, see the Wiki: TestKit User Guide

SBT library dependency:

libraryDependencies += "net.cakesolutions" %% "scala-kafka-client-testkit" % "2.3.1" % "test"

Version Compatibility

Starting after version 0.8.0, the versioning for Scala Kafka client will be tracking Kafka's versioning scheme. Binary compatibility in the new versioning system works as follows:

  • The first and the second digit in the version indicate compatibility with the Kafka driver. For example, is compatible with Kafka 0.9 and is compatible with Kafka 0.10.
  • The third digit in the version indicates an incompatible change between Scala Kafka client versions. For example, is not binary compatible with
  • The fourth digit in the version indicates a compatible change between Scala Kafka client versions. For example, is compatible with

Both the 0.10.* and 1.0.* versions are maintained concurrently.

Here is the full table of binary compatibilities between Scala Kafka client and the Kafka Java driver:

Scala Kafka client Kafka Java Driver
2.3.1 2.3.1
2.1.0 2.1.0
2.0.0 2.0.0
1.1.1 1.1.1
1.0.0 1.0.0
0.10.2.x 0.10.2.x
0.10.1.x 0.10.1.x 0.10.0.x 0.9.0.x

Change log

2.3.1 - 11/2019

  • Update to Kafka 2.3.1

2.1.0 - 12/2018

  • Update to Kafka 2.1.0

2.0.0 - 08/2018

  • Update to Kafka 2.0.0

1.1.0 - 08/2018

  • Update to Kafka 1.1.1

1.1.0 - 04/2018

  • Update to Kafka 1.1.0

1.0.0 - 12/2017

  • Update to Kafka 1.0.0 - 07/2017

  • Update to Kafka
  • Update Akka to 2.5.3
  • Added transaction related properties to config options. - 05/2017

  • Minor improvements to producer API - 05/2017

  • Update Kafka to
  • Update Akka to 2.4.18 - 02/2017

  • Update Kafka to
  • Update dependencies
  • Minor tweaks to logging verbosity - 01/2017

  • Crossbuild for Scala 2.11.8 and 2.12.1
  • Added maxMetaDataAge to KafkaConsumer (thanks @nitendragautam)
  • KafkaConsumerActor now terminates on downstream receiver actor termination (thanks @yoks)
  • Fixed bug related to Exception Handling in KafkaProducer (thanks @conniec) - 11/2016

  • Added new subscription mode: AutoPartitionWithManualOffset.
  • Updated Akka to 2.4.14.
  • Added new Retry count config, to prevent overwhelming an unresponsive downstream client. - 11/2016

  • Supports Kafka
  • Added support for new Consumer property: max.poll.interval
  • Removed log4j-over-slf4j dependency
  • Added examples to source, - 08/2016

  • Subscribe model changed, now supports more explicit subscription types
  • Handling of partition rebalances improved
  • ConsumerActor failure and restart mechanics improved
  • Versioning scheme changed
  • Testkit improvements
  • ConsumerActor wrapper API provided
  • Tested against Kafka

0.8.0 - 06/2016

  • Supports Kafka Client
  • Add max.poll.records config option to consumer

0.7.0 - 05/2016

  • Supports Kafka Client


YourKit supports open source projects with its full-featured Java Profiler. YourKit, LLC is the creator of YourKit Java Profiler and YourKit .NET Profiler, innovative and intelligent tools for profiling Java and .NET applications.


Copyright 2016-2018, Cake Solutions.

Licensed under the MIT License

You can’t perform that action at this time.