Replies: 5 comments 1 reply
-
Hi @rootBiao, I added an example in the latest PR that shows how I would do this. It's a bit complicated but should be possible with the current interface. Let me know if you have any issues though. https://github.com/aembke/fred.rs/blob/main/examples/keyspace.rs |
Beta Was this translation helpful? Give feedback.
-
这是来自QQ邮箱的假期自动回复邮件。你的邮件,陈陆彪已经收到。
|
Beta Was this translation helpful? Give feedback.
-
#![allow(clippy::disallowed_names)] use fred::{ use std::time::Duration;
} /// Examples showing how to set up keyspace notifications with clustered or centralized/sentinel deployments. /// There are two approaches that can be used to inspect the cluster connections. One approach uses the cached cluster async fn clustered_keyspace_events() -> Result<(), RedisError> { let reconnect_client = client.clone();
}); let keyspace_client = client.clone();
});
} I used the above code to test the node reconnection of Redis, but found that there was no code that triggered the reconnection |
Beta Was this translation helpful? Give feedback.
-
@rootBiao I updated the keyspace example (https://github.com/aembke/fred.rs/blob/main/examples/keyspace.rs) to fix the issue you mentioned |
Beta Was this translation helpful? Give feedback.
-
这是来自QQ邮箱的假期自动回复邮件。你的邮件,陈陆彪已经收到。
|
Beta Was this translation helpful? Give feedback.
-
Discovered that the client can only listen to key expiration events on one node and cannot listen to key expiration events on all nodes
Beta Was this translation helpful? Give feedback.
All reactions