LogoLogo
Back to Speedb.io⭐ GitHubDiscord
  • 👋About
    • Speedb Use Cases
    • Speedb Communication Channels
    • Release Cadence
    • Releases
    • Roadmap
  • 💻Getting started
    • Speedb Quick Start Example
    • Dependencies
    • How to Compile Speedb
    • Drop-in Replacement
    • Use prebuilt binaries
    • How to contribute
      • Contribute code
      • Feature request process
      • Submit a pull request
      • Add or update documentation
      • Report bugs and other issues
      • Help with new and ongoing feature development
    • Kafka Streams: How to use Speedb instead of RocksDB?
  • ✨Speedb Features
    • Memory Tracking
    • Speedb Tuning Function
    • Table Pinning Policy
    • Snapshot Optimization
    • On Thread Start Callback
    • Write Flow
    • Global Delayed write
    • Live Configuration Changes
    • Report Index Size per Column Family
    • Proactive Flushing
    • Sorted Hash Memtable
    • Paired Bloom Filter
  • ➕Enhancements
    • Range Delete Improvement
    • Dynamic Delayed Writes
    • Reduce switch memtable latency
  • 🛠️Tools
    • Log Parser
    • DB_bench: Groups
    • Beezcli Tool
  • 🔦RocksDB Basics
  • 📈Performance testing
Powered by GitBook
On this page
  • Rebuild Kafka with Speedb
  • Replace the library
  • Use the prebuilt Kafka+Speedb version

Was this helpful?

  1. Getting started

Kafka Streams: How to use Speedb instead of RocksDB?

PreviousHelp with new and ongoing feature developmentNextSpeedb Features

Last updated 1 year ago

Was this helpful?

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

Rebuild Kafka with Speedb

If you are building from source, you need to modify gradle/dependencies.gradle to point to Speedb instead of RocksDB and indicate version 2.4.1.5 instead of 7.1.2:

- rocksDBJni: "org.rocksdb:rocksdbjni:$versions.rocksDB",

+ rocksDBJni: "io.github.speedb-io:speedbjni:$versions.rocksDB",

- rocksDB: "7.1.2",

+ rocksDB: "2.4.1.5",

Replace the library

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)

Use the prebuilt Kafka+Speedb version

Click to download the latest compiled version.

💻
https://repo1.maven.org/maven2/io/github/speedb-io/speedbjni/2.4.1.5/
Here