github redis/jedis v5.0.0
5.0.0

latest releases: v5.2.0, v5.2.0-beta5, v5.1.5...
14 months ago

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

  • Cross cluster failover (#3310)
  • Allow setting default dialect for RediSearch module (#3452)
  • Support JSON.MERGE command (#3429)
  • Support TOPK.LIST with WITHCOUNT option (#3495)

๐Ÿ› Bug Fixes

  • Fix return value of HRANDFIELD with values when count is negative (#3425, #3430)
  • Return List instead of Set in ZDIFF, ZINTER, ZUNION commands (#3431)

๐Ÿงฐ Maintenance

  • Deprecate RedisJSON v1 support (#3503)
  • Deprecate RedisGraph support (#3504)
  • Deprecate Sharding/Sharded feature (#3386)
  • Bump org-json:json from 20230227 to 20230618 (#3472)

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");
    }
}

Don't miss a new jedis release

NewReleases is sending notifications on new releases.