> For the complete documentation index, see [llms.txt](https://docs.speedb.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.speedb.io/getting-started/kafka-streams-how-to-use-speedb-instead-of-rocksdb.md).

# 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. <br>

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&#x20;

### 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",&#x20;

\+ rocksDBJni: "io.github.speedb-io:speedbjni:$versions.rocksDB",&#x20;

\- rocksDB: "7.1.2",&#x20;

\+ rocksDB: "2.4.1.5",<br>

### 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:

[https://repo1.maven.org/maven2/io/github/speedb-io/speedbjni/2.4.1.5/](https://repo1.maven.org/maven2/io/github/speedb-io/speedbjni/2.4.1.1/)&#x20;

(the downloaded speedbjni file should be renamed to rocksdbjni-7.1.2.jar)

### Use the prebuilt Kafka+Speedb version&#x20;

Click [Here](https://storage.googleapis.com/speedb-artifacts/kafka/213_26/kafka_2.13-3.5.1.tgz) to download the latest compiled version.&#x20;

<br>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.speedb.io/getting-started/kafka-streams-how-to-use-speedb-instead-of-rocksdb.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
