I am using redis as a cache in one of my spring boot java application. I am performing only get operation on this redis instance from a scheduler code which runs every 30 seconds and write operation is performed by some other application. I have a scenario where if my redis instance goes down due to any reason then I have to stop doing a particular action. I am using jedis as redis client.Assume my jedis pool was configured and connection pool was created successfully.
For couple of iterations my scheduler worked fine and was able to perform the get operation on redis.Now assume redis went down so now at this point after 30 seconds my scheduler will run again and it will fail to perform get operation.I just need to identify if redis went down at this point.Is there any way to identify if the redis went down in above mentioned scenario?