Connect a Java or Spring Boot application to Redis for caching, session storage, or real-time features.
Use Redis Cluster or Sentinel for high-availability data storage in a Java microservice.
Stream Redis commands reactively in a Spring WebFlux application without blocking threads.
Store and query JSON documents or run vector similarity searches in Redis from a Java app.
| redis/lettuce | jagrosh/musicbot | k0shk0sh/fasthub | |
|---|---|---|---|
| Stars | 5,739 | 5,740 | 5,738 |
| Language | Java | Java | Java |
| Setup difficulty | easy | moderate | moderate |
| Complexity | 3/5 | 2/5 | 3/5 |
| Audience | developer | general | developer |
Figures from each repo's GitHub metadata at analysis time.
Add Lettuce to your Maven or Gradle build file, requires a running Redis instance to connect to.
Lettuce is a Java library that lets applications talk to Redis, a popular in-memory data store often used for caching, session storage, and real-time features. The library is maintained by Redis and handles the low-level work of opening connections, sending commands, and receiving results. What sets Lettuce apart from other Redis clients for Java is its support for three different programming styles in a single package. Synchronous usage means your code waits for each Redis command to finish before moving on, which is the simplest approach. Asynchronous usage means your code fires off commands and gets back a future object that will eventually contain the result, so other work can happen in the meantime. Reactive usage follows a stream-based model popular in modern Java frameworks, where you describe how to handle results when they arrive rather than waiting for them directly. All three styles share the same underlying connection, which is designed to be safe for use across multiple threads without creating a separate connection per thread. The library also supports Redis Sentinel and Redis Cluster, which are two ways to run Redis across multiple servers for higher reliability or bigger data sets. It handles automatic reconnection if the connection drops, encrypted connections over SSL, and different ways to encode your data, such as JSON or custom binary formats. For developers working with newer Redis features, the library includes support for RediSearch, RedisJSON, and Redis Vector Sets, which are add-ons that turn Redis into a search engine, a JSON document store, or a vector similarity store respectively. The library is available through Maven Central, the standard package registry for Java projects, so adding it to an existing Java project is a matter of adding a few lines to a build configuration file.
Lettuce is the official Java library for connecting to Redis, supporting synchronous, asynchronous, and reactive programming styles in one package with support for Redis Cluster and Sentinel.
Mainly Java. The stack also includes Java, Redis, Maven.
Apache 2.0, use freely in commercial Java projects with attribution.
Setup difficulty is rated easy, with roughly 30min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.