I'm using Spring Data Redis with Redis Sentinel and subscribe to keyspace event notifications. How to detect when a switch to a new master occurs as a result of a failover so that I can resubscribe to the required channels?
Asked
Active
Viewed 256 times
1 Answers
0
There is no need to manually detect failovers and resubscribe to channels when that happens, since Lettuce does that by itself (see StatefulRedisPubSubConnectionImpl#activated()
).

Inego
- 1,039
- 1
- 12
- 19
-
Is this possible using Jedis ? – Amber Kulkarni Oct 12 '20 at 15:50