go-redis icon indicating copy to clipboard operation
go-redis copied to clipboard

Redis Keyspace notification not working in cluster mode

Open diptomondal007 opened this issue 2 years ago • 0 comments

stackoverflow

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

diptomondal007 avatar Oct 01 '22 11:10 diptomondal007