I have an application that stores and reads date in Redis. When Redis goes down and then comes back up, the Jedis connection is not being recreated.
Is there is a way to create a connection retry in Jedis?
I have an application that stores and reads date in Redis. When Redis goes down and then comes back up, the Jedis connection is not being recreated.
Is there is a way to create a connection retry in Jedis?
You may use JedisPool. In case of broken connection JedisPool just invalidates broken connections.
Also you could use Redisson Redis Java client which has internal ConnectionWatchDog to avoid broken connections. Redisson exposes few settings to control Redis command retry logic: retryAttempts, retryInterval, timeout