{"id":13458844,"url":"https://github.com/redis/lettuce","last_synced_at":"2026-04-02T23:57:32.006Z","repository":{"id":16881108,"uuid":"19641638","full_name":"redis/lettuce","owner":"redis","description":"Advanced Java Redis client for thread-safe sync, async, and reactive usage. Supports Cluster, Sentinel, Pipelining, and codecs.","archived":false,"fork":false,"pushed_at":"2025-05-11T01:59:22.000Z","size":24345,"stargazers_count":5572,"open_issues_count":246,"forks_count":1020,"subscribers_count":206,"default_branch":"main","last_synced_at":"2025-05-11T02:51:21.419Z","etag":null,"topics":["asynchronous","aws-elasticache","azure-redis-cache","java","reactive","redis","redis-client","redis-cluster","redis-sentinel"],"latest_commit_sha":null,"homepage":"https://lettuce.io","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/redis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2014-05-10T13:08:46.000Z","updated_at":"2025-05-09T15:46:35.000Z","dependencies_parsed_at":"2024-01-13T17:49:45.769Z","dependency_job_id":"73ccc994-3af9-4a24-9aae-c4c02e390039","html_url":"https://github.com/redis/lettuce","commit_stats":{"total_commits":2418,"total_committers":150,"mean_commits":16.12,"dds":0.1575682382133995,"last_synced_commit":"d616b16661fb134884d32d6f487869318b3b1a03"},"previous_names":["mp911de/lettuce","redis/lettuce"],"tags_count":142,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redis%2Flettuce","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redis%2Flettuce/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redis%2Flettuce/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redis%2Flettuce/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/redis","download_url":"https://codeload.github.com/redis/lettuce/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253509751,"owners_count":21919585,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asynchronous","aws-elasticache","azure-redis-cache","java","reactive","redis","redis-client","redis-cluster","redis-sentinel"],"created_at":"2024-07-31T09:00:58.277Z","updated_at":"2026-01-11T17:33:34.394Z","avatar_url":"https://github.com/redis.png","language":"Java","readme":"\u003cimg src=\"https://avatars2.githubusercontent.com/u/25752188?v=4\" width=\"50\" height=\"50\"\u003e Lettuce - Advanced Java Redis client\n===============================\n\n [![Integration](https://github.com/redis/lettuce/actions/workflows/integration.yml/badge.svg?branch=main)](https://github.com/redis/lettuce/actions/workflows/integration.yml)\n [![codecov](https://codecov.io/gh/redis/lettuce/branch/main/graph/badge.svg?token=pAstxAAjYo)](https://codecov.io/gh/redis/lettuce)\n [![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE.txt)\n [![Maven Central](https://img.shields.io/maven-central/v/io.lettuce/lettuce-core?versionSuffix=RELEASE\u0026logo=redis\n )](https://maven-badges.herokuapp.com/maven-central/io.lettuce/lettuce-core)\n [![Javadocs](https://www.javadoc.io/badge/io.lettuce/lettuce-core.svg)](https://www.javadoc.io/doc/io.lettuce/lettuce-core)\n\n[![Discord](https://img.shields.io/discord/697882427875393627.svg?style=social\u0026logo=discord)](https://discord.gg/redis)\n[![Twitch](https://img.shields.io/twitch/status/redisinc?style=social)](https://www.twitch.tv/redisinc)\n[![YouTube](https://img.shields.io/youtube/channel/views/UCD78lHSwYqMlyetR0_P4Vig?style=social)](https://www.youtube.com/redisinc)\n[![Twitter](https://img.shields.io/twitter/follow/redisinc?style=social)](https://twitter.com/redisinc)\n[![Stack Exchange questions](https://img.shields.io/stackexchange/stackoverflow/t/lettuce?style=social\u0026logo=stackoverflow\u0026label=Stackoverflow)](https://stackoverflow.com/questions/tagged/lettuce)\n\n\nLettuce is a scalable thread-safe Redis client for synchronous,\nasynchronous and reactive usage. Multiple threads may share one connection if they avoid blocking and transactional\noperations such as `BLPOP` and  `MULTI`/`EXEC`.\nLettuce is built with [netty](https://github.com/netty/netty).\nSupports advanced Redis features such as Sentinel, Cluster, Pipelining, Auto-Reconnect and Redis data models.\n\nThis version of Lettuce has been tested against the latest Redis source-build.\n\n* [synchronous](https://redis.github.io/lettuce/user-guide/connecting-redis/#basic-usage), [asynchronous](https://redis.github.io/lettuce/user-guide/async-api/) and [reactive](https://redis.github.io/lettuce/user-guide/reactive-api/) usage\n* [Redis Sentinel](https://redis.github.io/lettuce/ha-sharding/#redis-sentinel_1)\n* [Redis Cluster](https://redis.github.io/lettuce/ha-sharding/#redis-cluster)\n* [SSL](https://redis.github.io/lettuce/advanced-usage/#ssl-connections) and [Unix Domain Socket](https://redis.github.io/lettuce/advanced-usage/#unix-domain-sockets) connections\n* [Streaming API](https://redis.github.io/lettuce/advanced-usage/#streaming-api)\n* [Codecs](https://redis.github.io/lettuce/integration-extension/#codecss) (for UTF8/bit/JSON etc. representation of your data)\n* multiple [Command Interfaces](https://github.com/redis/lettuce/wiki/Command-Interfaces-%284.0%29)\n* Support for [Native Transports](https://redis.github.io/lettuce/advanced-usage/#native-transports)\n* Support [RediSearch](https://redis.github.io/lettuce/user-guide/redis-search/), [RedisJSON](https://redis.github.io/lettuce/user-guide/redis-json/) and [Redis Vector Sets](https://redis.github.io/lettuce/user-guide/vector-sets/)\n* Compatible with Java 8++ (implicit automatic module w/o descriptors)\n\nSee the [reference documentation](https://redis.github.io/lettuce/) and [API Reference](https://www.javadoc.io/doc/io.lettuce/lettuce-core/latest/index.html) for more details.\n\n## How do I Redis?\n\n[Learn for free at Redis University](https://university.redis.io/academy)\n\n[Try the Redis Cloud](https://redis.io/try-free/)\n\n[Dive in developer tutorials](https://redis.io/learn/)\n\n[Join the Redis community](https://redis.io/community/)\n\n[Work at Redis](https://redis.io/careers/jobs/)\n\nDocumentation\n---------------\n\n* [Reference documentation](https://redis.github.io/lettuce/)\n* [Javadoc](https://www.javadoc.io/doc/io.lettuce/lettuce-core/latest/index.html)\n\nBinaries/Download\n----------------\n\nBinaries and dependency information for Maven, Ivy, Gradle and others can be found at http://search.maven.org.\n\nReleases of lettuce are available in the Maven Central repository. Take also a look at the [Releases](https://github.com/redis/lettuce/releases).\n\nExample for Maven:\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003eio.lettuce\u003c/groupId\u003e\n  \u003cartifactId\u003elettuce-core\u003c/artifactId\u003e\n  \u003cversion\u003ex.y.z\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nIf you'd rather like the latest snapshots of the upcoming major version, use our Maven snapshot repository and declare the appropriate dependency version.\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003eio.lettuce\u003c/groupId\u003e\n  \u003cartifactId\u003elettuce-core\u003c/artifactId\u003e\n  \u003cversion\u003ex.y.z.BUILD-SNAPSHOT\u003c/version\u003e\n\u003c/dependency\u003e\n\n\u003crepositories\u003e\n  \u003crepository\u003e\n    \u003cid\u003esonatype-snapshots\u003c/id\u003e\n    \u003cname\u003eSonatype Snapshot Repository\u003c/name\u003e\n    \u003curl\u003ehttps://oss.sonatype.org/content/repositories/snapshots/\u003c/url\u003e\n    \u003csnapshots\u003e\n      \u003cenabled\u003etrue\u003c/enabled\u003e\n    \u003c/snapshots\u003e\n  \u003c/repository\u003e\n\u003c/repositories\u003e\n```\n\nBasic Usage\n-----------\n\n```java\nRedisClient client = RedisClient.create(\"redis://localhost\");\nStatefulRedisConnection\u003cString, String\u003e connection = client.connect();\nRedisStringCommands sync = connection.sync();\nString value = sync.get(\"key\");\n```\n\nEach Redis command is implemented by one or more methods with names identical\nto the lowercase Redis command name. Complex commands with multiple modifiers\nthat change the result type include the CamelCased modifier as part of the\ncommand name, e.g. zrangebyscore and zrangebyscoreWithScores.\n\nSee [Basic usage](https://redis.github.io/lettuce/user-guide/connecting-redis/#basic-usage) for further details.\n\nAsynchronous API\n------------------------\n\n```java\nStatefulRedisConnection\u003cString, String\u003e connection = client.connect();\nRedisStringAsyncCommands\u003cString, String\u003e async = connection.async();\nRedisFuture\u003cString\u003e set = async.set(\"key\", \"value\");\nRedisFuture\u003cString\u003e get = async.get(\"key\");\n\nLettuceFutures.awaitAll(set, get) == true\n\nset.get() == \"OK\"\nget.get() == \"value\"\n```\n\nSee [Asynchronous API](https://redis.github.io/lettuce/user-guide/async-api/) for further details.\n\nReactive API\n------------------------\n\n```java\nStatefulRedisConnection\u003cString, String\u003e connection = client.connect();\nRedisStringReactiveCommands\u003cString, String\u003e reactive = connection.reactive();\nMono\u003cString\u003e set = reactive.set(\"key\", \"value\");\nMono\u003cString\u003e get = reactive.get(\"key\");\n\nset.subscribe();\n\nget.block() == \"value\"\n```\n\nSee [Reactive API](https://redis.github.io/lettuce/user-guide/reactive-api/) for further details.\n\nPub/Sub\n-------\n\n```java\nRedisPubSubCommands\u003cString, String\u003e connection = client.connectPubSub().sync();\nconnection.getStatefulConnection().addListener(new RedisPubSubListener\u003cString, String\u003e() { ... })\nconnection.subscribe(\"channel\");\n```\n\nBuilding\n-----------\n\nLettuce is built with Apache Maven. The tests require multiple running Redis instances for different test cases which\nare configured using a ```Makefile```. Tests run by default against Redis `latest`.\n\nTo build:\n\n```\n$ git clone https://github.com/redis/lettuce.git\n$ cd lettuce/\n$ make start\n```\n\n* Run the build: ```make test```\n* Start Redis (manually): ```make start```\n* Stop Redis (manually): ```make stop```\n* Clean up: ```make clean```\n\nBugs and Feedback\n-----------\n\nFor bugs, questions and discussions please use the [GitHub Issues](https://github.com/redis/lettuce/issues).\n\nLicense\n-------\n\n* This repository is licensed under the \"MIT\" license. See [LICENSE](LICENSE).\n* Fork of https://github.com/wg/lettuce\n\nContributing\n-------\n\nGithub is for social coding: if you want to write code, I encourage contributions through pull requests from forks of this repository. \nCreate Github tickets for bugs and new features and comment on the ones that you are interested in and take a look into [CONTRIBUTING.md](https://github.com/redis/lettuce/blob/main/.github/CONTRIBUTING.md)\n","funding_links":[],"categories":["Java","其他_大数据"],"sub_categories":["资源传输下载"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredis%2Flettuce","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fredis%2Flettuce","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredis%2Flettuce/lists"}