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
- Support RESP3 (#3293, #3387, #3388, #3389, #3403, #3507)
- Support Sharded PubSub (#3396)
- Introduce PipelineBase for Pipeline and multi node pipeline classes (#3437, #3442)
- 'double' timeout parameter for BLMPOP and BZMPOP commands (#3444)
๐งช 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.
- 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");
}
}
- 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");
}
}