Kafka Streams: How to use Speedb instead of RocksDB?
By default, Kafka streams uses RocksDB for state store. Speedb is a fully compatible fork of RocksDB that introduces overall performance improvements when used instead. By replacing RocksDB with Speedb you can enjoy the improved performance Speedb offers.
There are 3 options for replacement of RocksDB in Kafka 3.3 and higher:
- 1.Rebuild Kafka streams with Speedb
- 2.Replace the RocksDB library with Speedb library
- 3.Use the prebuilt Kafka+Speedb version
If you are building from source, you need to modify gradle/dependencies.gradle to point to Speedb instead of RocksDB and indicate version 22.214.171.124 instead of 7.1.2:
- rocksDBJni: "org.rocksdb:rocksdbjni:$versions.rocksDB",
+ rocksDBJni: "io.github.speedb-io:speedbjni:$versions.rocksDB",
- rocksDB: "7.1.2",
+ rocksDB: "126.96.36.199",
If you are using a prebuilt Kafka version, replace the file libs/rocksdbjni-7.1.2.jar with the jar downloaded from maven at the following URL:
(the downloaded speedbjni file should be renamed to rocksdbjni-7.1.2.jar)