Keyspace notifications do not report the value, only the key's name and/or command performed are included in the published message.

The main underlaying reasoning for this is that Redis values can become quite large.

If you really really really need this kind of behavior, well that's pretty easy actually. Because keyspace notifications are using Pub/Sub messages, you can just call PUBLISH yourself after each relevant operation, and with the information that you're interested in.

Answer from Itamar Haber on Stack Overflow
🌐
Microsoft Community Hub
techcommunity.microsoft.com › microsoft community hub › communities › products › azure › azure paas blog
Redis Keyspace Events Notifications | Microsoft Community Hub
January 15, 2021 - By default keyspace notifications are disabled because may have some impact on the Redis performance using some CPU power.
🌐
Redis
redis.io › docs › latest › develop › pubsub › keyspace-notifications
Redis keyspace notifications | Docs
1 day ago - It is possible to enable only one kind of notification in order to deliver just the subset of events we are interested in. By default keyspace event notifications are disabled because while not very sensible the feature uses some CPU power.
Discussions

python - Redis keyspace notifications - get both key and value change - Stack Overflow
Keyspace notifications do not report the value, only the key's name and/or command performed are included in the published message. The main underlaying reasoning for this is that Redis values can become quite large. More on stackoverflow.com
🌐 stackoverflow.com
Redis keyspace notifications subscriptions in distributed environment using ServiceStack - Stack Overflow
This works well in a single-host ... its Redis client, to '__keyspace@0__:expired', that service will pick it and take action. That's fantastic... ... until you have a high-availability topology set up, with more than one API instance in that cluster. Then every single host appears to be picking up on that message and potentially doing things with it. I know keyspace notifications don't work exactly the same as traditional pub/sub or messaging-layer events, but is there a way to perform some kind ... More on stackoverflow.com
🌐 stackoverflow.com
Subscribe to keyspace notification not working
You want to set the configuration to K$, not Ks. Using a lowercase s refers to commands that operate on sets (SADD, SDIFF, etc). The $ is for watching all string operations like GET and SET. Scalars in Redis are confusingly called “strings” even if they contain numbers. More on reddit.com
🌐 r/redis
4
0
May 17, 2022
Redis pubsub - Listening to a specific channel : How to do it?
RTFM mate: https://redis.io/topics/pubsub But to be a little more helpful. "auth" just authenticates your client to the server. There's no magic to Redis clients (except a little bit with Redis Sentinel). All they're doing is sending Redis built in commands over the wire. I'd suggest you play around with Redis CLI to familiarize yourself with the commands and then start worrying about programmatic access. The commands you're looking for are "publish" and "subscribe". Side note, Redis pub/sub is similar but entirely tangential to key space notifications. They are completely separate/independent, and unlike keyapace notifications, pub/sub spans Redis DBs. edit: Here's an example handler that I'd probably use in this situation. The handler map object would just be an object with the channel being the key and the value being a function that takes a standardized arg (perhaps the message?). https://pastebin.com/h2BdLLxA More on reddit.com
🌐 r/node
6
2
January 13, 2018
🌐
Redis
forum.redis.io › redis administration
Resource usage by keyspace notifications - Redis administration - Redis Community Forum
May 20, 2023 - The docs mention it’s disabled by default for performance reasons. So I’m wondering if anyone has ran some tests or are there any benchmarks to look at? Couldn’t find any. Also what if keyspace notifications are enabled…
🌐
GitHub
github.com › redis-developer › keyspace-notifications-node-redis
GitHub - redis-developer/keyspace-notifications-node-redis: Keyspace Notifications demo with Node Redis 4 · GitHub
$ git clone https://github.com/redis-developer/keyspace-notifications-node-redis.git $ cd keyspace-notifications-node-redis · For performance reasons, keyspace notifications are off by default.
Starred by 7 users
Forked by 2 users
Languages   Python 70.2% | JavaScript 29.8%
🌐
GitHub
gist.github.com › JonCole › 0d6205b4771e5c803bc1e085517484a2
Redis Keyspace Notification Example · GitHub
Redis Keyspace Notification Example. GitHub Gist: instantly share code, notes, and snippets.
🌐
StackExchange.Redis
stackexchange.github.io › StackExchange.Redis › KeyspaceNotifications.html
Redis Keyspace Notifications | StackExchange.Redis
If we consider that commonly a ... of notifications (since they are for cache invalidation), this can be a significant performance win. Database isolation is controlled either via the ConfigurationOptions.DefaultDatabase option when connecting to Redis, or by using the GetDatabase(int? db = null) method to get a specific database instance. Note that the KeySpace....
Find elsewhere
🌐
AWS re:Post
repost.aws › knowledge-center › elasticache-redis-keyspace-notifications
Implement Redis keyspace notifications in ElastiCache | AWS re:Post
April 29, 2024 - Note: By default, ElastiCache turns off Redis keyspace notifications. To activate keyspace notifications in a custom cache parameter group, use the notify-keyspace-events parameter. This parameter value uses multiple parameters to determine which channel (keyspace or key-event) is used and the information to post to the channel.
🌐
DEV Community
dev.to › sayganov › redis-keyspace-notifications-with-a-c-example-2ahp
Redis keyspace notifications with a C# example - DEV Community
April 25, 2023 - One of Redis' key features is its ability to trigger notifications based on key events happening in its keyspace, allowing for real-time updates.
🌐
Huawei Cloud
support.huaweicloud.com › help center › geminidb › geminidb redis api › development reference › keyspace notification
Keyspace Notification_Development Reference_GeminiDB Redis API_GeminiDB-Huawei Cloud
Enabling this function will affect instance performance, and some event notifications may be missed. ... Run CONFIG SET to enable or disable the keyspace notification. ... The keyspace notification is disabled if notify-keyspace-events is empty ...
🌐
Google Groups
groups.google.com › g › redis-db › c › pOdc8zBxB08
Keyspace Set notifications
1) - if I have to implement notification on an extra channel - why is the __keyspace@0__ good for ? I was happy to see that redis automaticaly notifies me for key changes, but as I said notification is not enough. 2) - as far as I undersood the semantic of the subscription channels, if I publish on a channel whithout subscribers, there is no extra overhead. So if the user subscribes for set commands on a key that is 0.5 GB, he has to take the performance impact on count.
🌐
OneUptime
oneuptime.com › home › blog › how to create redis keyspace notifications
How to Create Redis Keyspace Notifications
January 30, 2026 - You can watch a specific key for any changes, or watch for a specific type of change across all keys. By default, keyspace notifications are disabled because they consume CPU resources.
🌐
Linux Hint
linuxhint.com › enable-redis-keyspace-notification
Redis Keyspace Notification
April 1, 2022 - Linux Hint LLC, [email protected] 1210 Kelly Park Circle, Morgan Hill, CA 95037 Privacy Policy and Terms of Use
🌐
Yifan-online
yifan-online.com › en › km › article › detail › 370
How to solve the performance bottleneck caused by the key space notification of Redis? | yifan-online web service yifan
Redis keyspace notifications are a mechanism to notify clients when certain keyspace events occur. F | The leading AIGC tool testing field to help you grow and improve
🌐
DEV Community
dev.to › katpadi › til-redis-keyspace-notifications-3eca
TIL: Redis Keyspace Notifications - DEV Community
March 19, 2018 - Use keyspace if you want to receive the name of the event. Use keyevent if you want to receive the name of the key. So, here’s an example of what I played around with: # Subscriber $redis.psubscribe(' __keyevent@*__ :zrem') do |on| on.pmessage do |pattern, channel, message| puts "==== AFTER zrem EVENT =====" # Available things: puts "pattern: #{pattern}" puts "channel: #{channel}" puts "message: #{message}" end end
🌐
GitHub
github.com › oneuptime › blog › tree › master › posts › 2026-01-30-redis-keyspace-notifications
blog/posts/2026-01-30-redis-keyspace-notifications at master · OneUptime/blog
You can watch a specific key for any changes, or watch for a specific type of change across all keys. By default, keyspace notifications are disabled because they consume CPU resources.
Author   OneUptime
🌐
Medium
borakasmer.medium.com › redis-keyspace-notifications-on-c-988014f0d62c
Redis Keyspace Notifications on C# | by Bora Kaşmer | Medium
December 4, 2023 - Redis has a “Keyspace Notifications” key feature. Its ability to trigger notifications based on key events happening in its keyspace allows for real-time updates for different types of events.