Re.This is a Kotlin Multiplatform Redis client built for coroutine‐based, non‐blocking, high‐performance applications.
- ✅ Raw sockets & connection pooling for rock‐solid throughput
- ✅ Full support for RESPv2/RESPv3, RedisJSON, Streams, Pub/Sub, and more
- ✅ Tiny footprint over all targets: JVM, Android, iOS, WASM, Node.js, and other native targets
- ✅ Сompatible with Valkey/KeyDB — since it shares the same API as Redis.
Designed for modern Kotlin developers seeking a fast, lightweight, and idiomatic Redis integration.
- Complete Command Coverage Strings, Hashes, Lists, Sets, Sorted Sets, Streams, Bitmaps, Geospatial, Transactions, Scripting, Functions, ...
- Advanced Patterns
- Pipelining & Transactions DSL
- Publish/Subscribe with lifecycle management
- Script & JSON support
- Multiplatform Targets JVM, Android, iOS, Linux, Windows, macOS, tvOS, watchOS, Node.js, WASM
- High Performance Optimized for throughput and minimal latency via raw socket I/O
Add to your build.gradle.kts:
dependencies {
implementation("eu.vendeli:rethis:0.4.3")
}suspend fun main() { // 1. Initialize client (defaults to localhost:6379) val client = ReThis() // 2. Simple SET/GET client.set("hello", "world") println(client.get("hello")) // → "world" // 3. Pipeline multiple commands val results = client.pipeline { set("foo", "bar") get("foo") } println(results) // → [OK, "bar"] // 4. Transaction val txResults = client.transaction { set("bar", "baz") get("bar") } println(txResults) // → [OK, "baz"] // 5. Pub/Sub example client.subscribe("news") { _, msg -> println("Received: $msg") } }
| Library | Ops/sec |
|---|---|
| Jedis (pooled) | 2,038 |
| Kreds | 448 |
| Lettuce | 1,747 |
| Rethis | 2,171 |
See more detailed report.
- Java: 17+
- Redis/Valkey/KeyDB: any modern version (RESPv2/v3)
Thanks to all contributors and users—your feedback drives our improvements!
⭐ If you find Re.This helpful, please give it a star on GitHub!