What Is New in Jedis 7.2
Jedis 7.2 delivers key enhancements focused on Redis protocol support, performance tuning, and API improvements. This update strengthens the foundation for building robust Redis applications.
| Category | Key Changes |
|---|---|
| New Features | Support for RESP3 protocol, Redis Functions, and ACL DRYRUN command. |
| Improvements | Enhanced connection pool, reduced latency, and new UnifiedJedis interface. |
| Bug Fixes | Resolved issues with connection handling and command execution. |
| Deprecations | Deprecated older interfaces like ShardedJedisPool. |
How does RESP3 protocol support improve my application?
Jedis 7.2 adds support for the RESP3 protocol, which is the new Redis serialization protocol. This matters because RESP3 provides more semantic responses and better data types compared to RESP2.
In practice, you'll get richer type information from Redis commands. This enables more efficient client-side processing and lays the groundwork for future Redis features that rely on RESP3's enhanced capabilities.
What are the main performance improvements?
The connection pool implementation has been significantly optimized in this release. You'll notice reduced latency and better resource utilization under heavy load.
These changes make Jedis more efficient for high-throughput applications. The improvements are particularly noticeable when using connection pooling in cloud environments where network latency varies.
What's new with Redis Functions support?
Jedis 7.2 introduces full support for Redis Functions, allowing you to work with server-side scripts more effectively. You can now invoke functions using fcall and fcallAsync methods.
This approach is more maintainable than traditional Lua scripting since functions are stored and managed on the server. It simplifies your application code by moving complex logic to the Redis server.
Should I be concerned about deprecated features?
The release deprecates several older interfaces including ShardedJedisPool and certain constructor methods. These are being phased out in favor of more modern alternatives.
You should plan to migrate from deprecated APIs, but they'll continue to work for now. The new UnifiedJedis interface provides a better long-term foundation for your application code.
FAQ
Does Jedis 7.2 require Redis server version 7.2?
No, Jedis 7.2 is a client library version that works with various Redis server versions. The RESP3 protocol support requires Redis 6.0+ though.
How do I enable RESP3 protocol in my application?
You can enable RESP3 by setting the protocol configuration when creating your Jedis client instance. Check the connection configuration options for the specific method to enable the newer protocol.
What should I use instead of the deprecated ShardedJedisPool?
For sharding needs, consider using Redis Cluster instead which provides better scalability and automatic sharding. The standard JedisCluster client supports this approach.
Are there any breaking changes in this release?
While there are deprecations, most existing code should continue working. The main changes are additive - new features and improvements that don't break backward compatibility for standard use cases.
How does the ACL DRYRUN command help with security?
The ACL DRYRUN command lets you test whether a user can execute specific commands without actually running them. This is useful for validating permissions during development and testing phases.