MyGit

v5.0.0

redis/jedis

版本发布时间: 2023-09-03 17:41:09

redis/jedis最新发布版本:v5.0.2(2023-10-19 19:20:25)

What's New?

Automatic Cross-Cluster Failover

We're happy to introduce the Cross-Cluster Failover feature in Jedis. This feature provides high availability and resilience by allowing seamless transitions between Redis clusters during unforeseen failures or downtimes. It's a built-in tool to minimize manual intervention and downtime and ensure a more resilient application infrastructure. Learn more about how you can automate the failover process in our documentation.

Full Redis 7.2 and RESP3 Support

Examples to enable RESP3 are included later in this release note.


Changes

🔥 Breaking Changes (Listed here)

🚀 New Features

🧪 Experimental Features

🐛 Bug Fixes

🧰 Maintenance


RESP3 Examples

This release introduces enabling RESP3 Redis connection, when the Redis server supports it.

  1. Enable RESP3 to a UnifiedJedis object:
import redis.clients.jedis.DefaultJedisClientConfig;
import redis.clients.jedis.HostAndPort;
import redis.clients.jedis.UnifiedJedis;

class DoResp3 {
    public static void main() {
        HostAndPort hnp = HostAndPort.from("localhost:6379");
        UnifiedJedis c =  UnifiedJedis(hnp, DefaultJedisClientConfig.builder().resp3().build());
        c.set("foo", "value!");
        c.get("foo");
    }
}
  1. Enable RESP3 to a Jedis object:
import redis.clients.jedis.DefaultJedisClientConfig;
import redis.clients.jedis.HostAndPort;
import redis.clients.jedis.Jedis;

class DoResp3 {
    public static void main() {
        HostAndPort hnp = HostAndPort.from("localhost:6379");
        Jedis c =  Jedis(hnp, DefaultJedisClientConfig.builder().resp3().build());
        c.set("foo", "value!");
        c.get("foo");
    }
}

相关地址:原始地址 下载(tar) 下载(zip)

查看:2023-09-03发行的版本