redis /lettuce

Redis Java client

★ 5,786⑂ 1,123👁 195⑃ 1,071● 2,620▤ 165
JavaMITCreated 2014-05-10redis.github.io/lettuce/
下载:7.9.0.RELEASE7.9.0.RELEASE ↓7.9.0.RELEASE2026-10-14
+0
日增长
5,786
stars
1,123
forks
195
watchers
1,071
prs
2,620
issues
165
releases

README

Lettuce - Advanced Java Redis client
===============================

 
 
 
 
 








Lettuce is a scalable thread-safe Redis client for synchronous,
asynchronous and reactive usage. Multiple threads may share one connection if they avoid blocking and transactional
operations such as BLPOP and  MULTI/EXEC.
Lettuce is built with netty.
Supports advanced Redis features such as Sentinel, Cluster, Pipelining, Auto-Reconnect and Redis data models.

This version of Lettuce has been tested against the latest Redis source-build.

 synchronous, asynchronous and reactive usage
 Redis Sentinel
 Redis Cluster
 SSL and Unix Domain Socket connections
 Streaming API
 Codecs (for UTF8/bit/JSON etc. representation of your data)
 multiple Command Interfaces
 Support for Native Transports
 Support RediSearch, RedisJSON and Redis Vector Sets
 Compatible with Java 8++ (implicit automatic module w/o descriptors)

See the reference documentation and API Reference for more details.

 How do I Redis?

Learn for free at Redis University

Try the Redis Cloud

Dive in developer tutorials

Join the Redis community

Work at Redis

Documentation
---------------

 Reference documentation
 Javadoc

Binaries/Download
----------------

Binaries and dependency information for Maven, Ivy, Gradle and others can be found at http://search.maven.org.

Releases of lettuce are available in the Maven Central repository. Take also a look at the Releases.

Example for Maven:

xml

  io.lettuce
  lettuce-core
  x.y.z



If you'd rather like the latest snapshots of the upcoming major version, use our Maven snapshot repository and declare the appropriate dependency version.

xml

  io.lettuce
  lettuce-core
  x.y.z.BUILD-SNAPSHOT



  
    sonatype-snapshots
    Sonatype Snapshot Repository
    https://oss.sonatype.org/content/repositories/snapshots/
    
      true
    
  



Basic Usage
-----------

java
RedisClient client = RedisClient.create("redis://localhost");
StatefulRedisConnection connection = client.connect();
RedisStringCommands sync = connection.sync();
String value = sync.get("key");


Each Redis command is implemented by one or more methods with names identical
to the lowercase Redis command name. Complex commands with multiple modifiers
that change the result type include the CamelCased modifier as part of the
command name, e.g. zrangebyscore and zrangebyscoreWithScores.

See Basic usage for further details.

Asynchronous API
------------------------

java
StatefulRedisConnection connection = client.connect();
RedisStringAsyncCommands async = connection.async();
RedisFuture set = async.set("key", "value");
RedisFuture get = async.get("key");

LettuceFutures.awaitAll(set, get) == true

set.get() == "OK"
get.get() == "value"


See Asynchronous API for further details.

Reactive API
------------------------

java
StatefulRedisConnection connection = client.connect();
RedisStringReactiveCommands reactive = connection.reactive();
Mono set = reactive.set("key", "value");
Mono get = 

Top issues

Discussions

Latest release

7.9.0.RELEASE 7.9.0.RELEASE 2026-10-14
The Lettuce team is pleased to announce the Lettuce 7.9.0 minor release!

Lettuce 7.9.0 supports Redis 2.6+ up to Redis 8.x. In terms of Java runtime, Lettuce requires at least Java 8 and
works with Java 24. The driver is tested against Redis 8.10, Redis 8.8, Redis 8.6, Redis 8.4, Redis 8.2, Redis 8.0, Redis 7.4 and Redis 7.2.

Thanks to all contributors who made Lettuce 7.9.0.RELEASE possible.

📗 Links
Reference documentation: https://lettuce.io/core/7.9.0.RELEASE

🐞 Bug Fixes
 Fix GEODIST destination argument validation by @codingkiddo in https://github.com/redis/lettuce/pull/3934

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON