-
Notifications
You must be signed in to change notification settings - Fork 979
About Lettuce
Lettuce is a scalable thread-safe Redis client providing synchronous,
asynchronous and reactive APIs. Multiple threads may share one connection if they avoid blocking and transactional operations such as BLPOP
and MULTI
/EXEC
.
Multiple connections are efficiently managed by the excellent netty NIO
framework. Support for advanced Redis features such as Sentinel, Cluster, and Redis data models is included.
Lettuce was originally written by Will Glozer as scalable and thread-safe Java Redis client. It was the most advanced client providing the greatest Redis command coverage, but the maintenance stopped somewhere mid-2013.
It started with a project on which I worked on. I had to integrate Redis for collecting logs during integration tests. I tried several, available clients. Every one of them had issues with unstable connections, library issues (external libraries that get in conflict with the existing project dependencies) or was just not up to date. I was experiencing connections drops in my environment; sometimes there is a lot of traffic, and sometimes the connection is idle for hours.
Based on my research, Lettuce was the best choice amongst all. Lettuce provides async handling out of the box; it can reconnect inactive connections. The only problem: It’s not up to date, and the last release was one year ago. I’ve added the latest features including Sentinel and cluster support and opened a pull request, but there was no real interest in merging the changes back into Lettuce. After some controversy on this, I’ve decided to publish my fork of Lettuce. My vision for Lettuce is becoming the best Redis client available.
Lettuce documentation was moved to https://redis.github.io/lettuce/overview/
Intro
Getting started
- Getting started
- Redis URI and connection details
- Basic usage
- Asynchronous API
- Reactive API
- Publish/Subscribe
- Transactions/Multi
- Scripting and Functions
- Redis Command Interfaces
- FAQ
HA and Sharding
Advanced usage
- Configuring Client resources
- Client Options
- Dynamic Command Interfaces
- SSL Connections
- Native Transports
- Unix Domain Sockets
- Streaming API
- Events
- Command Latency Metrics
- Tracing
- Stateful Connections
- Pipelining/Flushing
- Connection Pooling
- Graal Native Image
- Custom commands
Integration and Extension
Internals