go-redis
go-redis copied to clipboard
Redis Keyspace notification not working in cluster mode
I am using go-redis/v8 as a client library and its universal client to get/set etc. I am subscribing to the keyspace notifications like the one below.
keyspace := fmt.Sprintf("__keyspace@%d__:%s", s.config.Redis.DB, key)
ch := s.rdb.GetClient().Subscribe(ctx, keyspace).Channel()
Current Behavior
It seems the subscriber is not getting any notification messages in the cluster mode of Redis. But it's working in dev env when the Redis was set up in docker-compose in standalone mode.
Expected Behavior
The subscriber channel should receive the message for any command on that key