Alpakka Kafka connector

The Alpakka project is an open source initiative to implement stream-aware and reactive integration pipelines for Java and Scala. It is built on top of Akka Streams, and has been designed from the ground up to understand streaming natively and provide a DSL for reactive and stream-oriented programming, with built-in support for backpressure. Akka Streams is a Reactive Streams and JDK 9+ java.util.concurrent.Flow-compliant implementation and therefore fully interoperable with other implementations.

This Alpakka Kafka connector lets you connect Apache Kafka to Akka Streams. It was formerly known as Akka Streams Kafka and even Reactive Kafka.

The examples in this documentation use

Release notes are found at Github releases.

If you want to try out a connector that has not yet been released, give snapshots a spin which are published after every commit on master.

Matching Versions

Kafka Akka version Alpakka Kafka Connector
1.1.x 2.5.x release 0.20
1.0.x 2.5.x release 0.20
0.11.x 2.5.x release 0.19
0.11.x 2.4.x release 0.18

Reported issues

Issues at Github


libraryDependencies += "com.typesafe.akka" %% "akka-stream-kafka" % "0.21.1"
dependencies {
  compile group: 'com.typesafe.akka', name: 'akka-stream-kafka_2.12', version: '0.21.1'

This connector depends on Akka 2.5.x and note that it is important that all akka-* dependencies are in the same version, so it is recommended to depend on them explicitly to avoid problems with transient dependencies causing an unlucky mix of versions.

Scala and Java APIs

There are two separate packages named akka.kafka.scaladsl and akka.kafka.javadsl with the API for Scala and Java. These packages contain Producer and Consumer classes with factory methods for the various Akka Streams Flow, Sink and Source that are producing or consuming messages to/from Kafka.


Please feel free to contribute to Alpakka and the Alpakka Kafka connector by reporting issues you identify, or by suggesting changes to the code. Please refer to our contributing instructions to learn how it can be done.

We want Akka and Alpakka to strive in a welcoming and open atmosphere and expect all contributors to respect our code of conduct.

The source code for this page can be found here.