What Is New in Jedis 3.4
Jedis 3.4 introduces a host of improvements focused on enhancing the developer experience and expanding Redis command support. This release brings new features, crucial bug fixes, and important deprecations to keep the client modern.
| Category | Key Changes |
|---|---|
| New Features | Support for Redis Streams, GEO commands, and HyperLogLog operations. |
| Improvements | Enhanced connection handling and internal resource management. |
| Bug Fixes | Resolved issues with connection leaks and specific command behaviors. |
| Deprecated | Marked several older methods for future removal. |
What new Redis commands are supported?
Jedis 3.4 adds full support for the Redis Streams data type, a major feature for log processing and messaging.
This includes commands like XADD, XREAD, and XGROUP for creating,
consuming, and managing streams.
You also get new GEO commands like GEORADIUSBYMEMBER and HyperLogLog commands such as
PFMERGE. This matters because it brings the client up to speed with powerful server-side features
you might already be using.
How is connection management better?
The underlying connection handling has been made more robust to prevent resource leaks. In practice, this means your application is less likely to run into issues with connections not being properly returned to the pool under certain error conditions.
These internal improvements make the client more reliable for long-running applications, especially in containerized environments where resource constraints are common.
What bugs were squashed in this release?
This version fixes a critical bug where connections could be leaked when an exception occurred during operation.
Another fix addresses an issue with the hset command when used with a variable number of arguments.
These are the kinds of fixes that directly impact stability. If you've seen sporadic connection growth or had problems with certain command signatures, upgrading will resolve that.
What's being deprecated that I should know about?
Several older methods have been marked as deprecated in this release. This includes the
BinaryShardedJedis class and specific methods within the BinaryClient class.
You'll start seeing deprecation warnings. It's a good time to check your codebase and plan to migrate off these APIs, as they are likely to be removed in a future major version like Jedis 4.0.
FAQ
Is the Redis Streams API in Jedis 3.4 full-featured?
Yes, Jedis 3.4 provides comprehensive
support for the core Redis Streams commands, allowing you to produce to and consume from streams, and manage
consumer groups directly.
I had a connection leak issue, will upgrading to 3.4 fix it?
Very likely. One of the main bug
fixes in this release specifically targets and resolves a scenario where connections were not being returned to
the pool, which should eliminate that type of leak.
Are the deprecated methods removed yet?
No, they are only marked as deprecated with
annotations and warnings. They still function in 3.4 but will be removed in a future major release, so you
should start planning your migration.
Does this release include any new dependencies?
No, Jedis 3.4 does not introduce any new
external library dependencies. The changes are contained within the client's own codebase.
Is performance improved in version 3.4?
While not a primary focus, the internal improvements
to connection handling can lead to more consistent performance by preventing resource exhaustion from leaks.