-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UnifiedJedis is missing support for transactions #2857
Comments
@njibhu Transaction makes sense on a strict single connection (like Jedis). UnifiedJedis would rarely be used on a single connection. So it's not feasible to add Transaction in UnifiedJedis. You can use Transaction directly. We've also added |
@sazzad16 Thanks for the explaination ! What would actually be the recommended way to use directly Transaction ? Is there a way to get a single connection from a UnifiedJedis to pass to the Transaction constructor ? Or should I have a normal Jedis instance only to create Transactions and keep the UnifiedJedis for my other queries ? |
@njibhu You can create a Connection and use that to create Jedis, UnifiedJedis, Transaction, etc.
PS: This is not something that I would confidently recommend for production. |
Merged #3361 |
Description
The new
UnifiedJedis
class added with Jedis 4.0.0 is missing support for thewatch
andmulti
commands.I also couldn't find a way to easily instantiate from the
Transaction
class directly from a UnifiedJedis instance.Redis / Jedis Configuration
Jedis version: 4.1.1
Redis version: 6.x
Java version: 17
The text was updated successfully, but these errors were encountered: