You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
D:\src\red>kubectl exec -ti my-red-redis-cluster-1 -- /bin/bash
I have no name!@my-red-redis-cluster-1:/$ redis-cli config set notify-keyspace-events AKEnm
OK
Then I try to subscribe to key updates. For each i in 0..5 I did
varredis=awaitConnectionMultiplexer.ConnectAsync($"my-red-redis-cluster-{i}.my-red-redis-cluster-headless.default.svc.cluster.local:6379,password={password}");varsub=redis.GetSubscriber();varchannel=newRedisChannel("__key*@*__:*",RedisChannel.PatternMode.Pattern);awaitsub.SubscribeAsync(channel,Accept);Console.WriteLine($"Subscribed to channel {i} - {sub.SubscribedEndpoint(channel)}");
I see it connects to the same server for any "i" value
Subscribed to channel 4 - 10.1.37.157:6379
Subscribed to channel 0 - 10.1.37.157:6379
Subscribed to channel 2 - 10.1.37.157:6379
Subscribed to channel 3 - 10.1.37.157:6379
Subscribed to channel 5 - 10.1.37.157:6379
Subscribed to channel 1 - 10.1.37.157:6379
And then I receive only ~ 33% of notifications.
if I subscribe using redis-cli on each server - I receive all notifications too.
What should I do to receive all notifications in C# program?
Keyspace notification events are not currently supported on cluster; if
there is demand, it is feasible - just: as you have observed, it isn't as
simple as standard pub/sub, because it doesn't broadcast.
Implemented in StackExchange.Redis 2.11.0 (#2995): full cluster keyspace/keyevent delivery via RedisChannelOptions.MultiNode + RedisChannel.KeySpace/KeyEvent (see docs/KeyspaceNotifications.md). Same feature as #2750. Closing as completed.
Note: requires the new multi-node channel API rather than a raw __key*@*__:* pattern subscribe.
Activity
mgravell commentedon Feb 4, 2025
mgravell commentedon Jul 22, 2026
Implemented in StackExchange.Redis 2.11.0 (#2995): full cluster keyspace/keyevent delivery via
RedisChannelOptions.MultiNode+RedisChannel.KeySpace/KeyEvent(see docs/KeyspaceNotifications.md). Same feature as #2750. Closing as completed.Note: requires the new multi-node channel API rather than a raw
__key*@*__:*pattern subscribe.