dragonfly
dragonfly copied to clipboard
Support keyspace notifications
Redis support keyspace notifications by command CONFIG SET notify-keyspace-events xE
, but dragonfly does not support it:
CONFIG SET notify-keyspace-events xE
(error) ERR CONFIG SET failed (possibly related to argument 'notify-keyspace-events').
I'd like to subscribe to timeout key events. Is there any solution?
Dragonfly does not support key events. Specifically, timeout events is not designed well in Redis and does not guarantee accurate events for all the keys. Can you please describe your use-case for this ?
@romange My scenario is to monitor which key expires in real time, which was previously achieved by subscribing to redis's key expiration event. In my system, key expiration means that the tasks corresponding to this key may not be handled in a timely manner, and a mechanism is needed to monitor these tasks that are not handled in time. It is true that the redis key event is not a reliable method, but it does not need to implement too many functions alone, so it is convenient.
@romange My scenario is to monitor which key expires in real time, which was previously achieved by subscribing to redis's key expiration event. In my system, key expiration means that the tasks corresponding to this key may not be handled in a timely manner, and a mechanism is needed to monitor these tasks that are not handled in time. It is true that the redis key event is not a reliable method, but it does not need to implement too many functions alone, so it is convenient.
Are there other methods besides the one you mentioned? Because I'm using the same thing in my project
We cannot convert redis to dragonflydb in some scenarios due to this limitation. Happy to answer any other questions about this use case. But it does seem like a necessary feature of redis to support.