How to enable automatic redis connection reconnection in Jedis client

I have an application that stores and reads a date in Redis when Redis comes down. After Redis got up, jedis connection is not recreated?

Is there a way to create a repeat connection in Jedis

Thanks in advance

+4
source share
1 answer

One way to overcome the problem is to use a connection pool. I am using JedisPool. Although I cannot find anywhere in the documentation that JedisPool supports automatic reconnection, in my tests I can continue to use the Redis cache after restarting the service.

lettuce, , .

+1

Source: https://habr.com/ru/post/1680426/


All Articles