-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
subscribe to redis cluster #2846
Comments
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.
…On Tue, 4 Feb 2025, 20:54 Anton Burtsev, ***@***.***> wrote:
I deployed redis cluster with following command
helm install my-release oci://registry-1.docker.io/bitnamicharts/redis-cluster
helm created 6 nodes: 3 masters and 3 slaves
I activated notifications on EACH pod
D:\src\red>kubectl exec -ti my-red-redis-cluster-1 -- /bin/bash
I have no ***@***.***:/$ 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
var redis = await ConnectionMultiplexer.ConnectAsync(
$"my-red-redis-cluster-{i}.my-red-redis-cluster-headless.default.svc.cluster.local:6379,password={password}");
var sub = redis.GetSubscriber();
var channel = new RedisChannel("__key*@*__:*", RedisChannel.PatternMode.Pattern);
await sub.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?
—
Reply to this email directly, view it on GitHub
<#2846> or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAEHMH2XEINSPW73RXCLCD2OESITBFKMF2HI4TJMJ2XIZLTSOBKK5TBNR2WLJDUOJ2WLJDOMFWWLO3UNBZGKYLEL5YGC4TUNFRWS4DBNZ2F6YLDORUXM2LUPGBKK5TBNR2WLJLJONZXKZNENZQW2ZNLORUHEZLBMRPXI6LQMWBKK5TBNR2WLJDUOJ2WLJDOMFWWLLTXMF2GG2C7MFRXI2LWNF2HTLDTOVRGUZLDORPXI6LQMWSUS43TOVS2M5DPOBUWG44SQKSHI6LQMWVHEZLQN5ZWS5DPOJ42K5TBNR2WLKBRG43TIOBRHAZYFJDUPFYGLJLJONZXKZNFOZQWY5LFVIZDQMZRGI3TQOBWHCTXI4TJM5TWK4VGMNZGKYLUMU>
.
You are receiving this email because you are subscribed to this thread.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>
.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I deployed redis cluster with following command
helm created 6 nodes: 3 masters and 3 slaves
I activated notifications on EACH pod
Then I try to subscribe to key updates. For each i in 0..5 I did
I see it connects to the same server for any "i" value
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?
The text was updated successfully, but these errors were encountered: