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
🌐
Medium
medium.com › @imamramadhanns › working-with-redis-keyspace-notifications-x-python-c5c6847368a
Working with Redis Keyspace Notifications x Python | by Imam Ramadhan | Medium
September 21, 2021 - By default, keyspace events notifications are disabled. We can enable them in redis.conf or redis-cli as below
🌐
AWS re:Post
repost.aws › knowledge-center › elasticache-redis-keyspace-notifications
Implement Redis keyspace notifications in ElastiCache | AWS re:Post
April 29, 2024 - Navigate to notify-keyspace-events, and then enter AKE in the Value field. For more information about allowed values, see Redis 2.8.6 added parameters. Choose Save changes. The changes take effect immediately and the cluster doesn't need to ...
🌐
Webinterpret Tech
tech.webinterpret.com › redis-notifications-python
Redis keyspace notifications in python
May 13, 2020 - Redis keyspace notifications have been available since version 2.8.0. For each action altering any Redis key, we can configure Redis to publish a message to a Pub/Sub. Then we can subscribe to those notifications.
🌐
Redis
redis.io › docs › latest › develop › pubsub › keyspace-notifications
Redis keyspace notifications | Docs
6 days ago - Setting the parameter to the empty string disables notifications. In order to enable the feature a non-empty string is used, composed of multiple characters, where every character has a special meaning according to the following table: K Keyspace events, published with __keyspace@<db>__ prefix.
🌐
Medium
medium.com › hashtrusttechnologies › understanding-redis-keyspace-notifications-with-python-856503e8c594
Understanding Redis Keyspace Notifications with Python | by HashTrust Technologies Pvt. Ltd. | Hashtrust_Technologies | Medium
December 17, 2025 - A keyspace notification on channel __keyspace@0__:user:123 with message “set” · A keyevent notification on channel __keyevent@0__:set with message “user:123” · Let’s start with a simple example. First, install the redis-py library:
🌐
GitHub
github.com › redis-developer › keyspace-notifications-node-redis
GitHub - redis-developer/keyspace-notifications-node-redis: Keyspace Notifications demo with Node Redis 4 · GitHub
This is a small project using Redis and Redis Keyspace Notifications. Keyspace notifications allow clients to subscribe to Pub/Sub channels in order to receive events affecting the Redis data set in some way.
Starred by 7 users
Forked by 2 users
Languages   Python 70.2% | JavaScript 29.8%
🌐
OneUptime
oneuptime.com › home › blog › how to create redis keyspace notifications
How to Create Redis Keyspace Notifications
January 30, 2026 - You must explicitly enable them using the notify-keyspace-events configuration parameter. The parameter accepts a string of characters, where each character enables a specific class of events: Add this line to your redis.conf file to enable all events on both channel types:
Find elsewhere
🌐
GitHub
github.com › redis-developer › keyspace-notifications-node-redis › blob › main › python › README.md
keyspace-notifications-node-redis/python/README.md at main · redis-developer/keyspace-notifications-node-redis
Keyspace Notifications demo with Node Redis 4. Contribute to redis-developer/keyspace-notifications-node-redis development by creating an account on GitHub.
Author   redis-developer
🌐
Stack Overflow
stackoverflow.com › questions › 66039153 › redis-cluster-key-space-event-notifications
python - Redis Cluster Key/Space event notifications - Stack Overflow
This means that to receive all keyspace events of a cluster, clients need to subscribe to each of the nodes." I have used redis-py-cluster package and written the following code: def test_pub_sub(): pubsub = rs.pubsub() #pubsub.subscribe('music') ...
🌐
GitHub
github.com › sohonetlabs › nameko-rediskn
GitHub - sohonetlabs/nameko-rediskn: Redis Keyspace Notifications extension for Nameko services. · GitHub
# config.yaml REDIS: notification_events: "KEA" pubsub_backoff_factor: 3 REDIS_URIS: MY_REDIS: "redis://localhost:6380/0"
Author   sohonetlabs
🌐
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
This example demonstrates how to handle session expirations in a Python application using redis-py. ... import redis import threading import json from datetime import datetime class SessionExpirationHandler: """ Handles session expiration events from Redis keyspace notifications.
Author   OneUptime
🌐
Redis
redis.io › home
Redis Server-Assisted Client-Side Caching in Python | Redis
March 27, 2025 - This was a good way to spend some time caching. You may already be familiar with Redis’ keyspace notifications, which are events about the keyspace—such as modifications to keys—sent on PubSub channels.
🌐
Packtpub
subscription.packtpub.com › book › data › 9781783988181 › 9 › ch09lvl1sec67 › redis-keyspace-notifications
Redis keyspace notifications
Called keyspace notification, functionality for monitoring events like all the commands that change a given key, all keys receiving specific commands such as HSET, or all keys that are about to be deleted because of an EXPIRE command.
🌐
Reddit
reddit.com › r/redis › subscribe to keyspace notification not working
r/redis on Reddit: Subscribe to keyspace notification not working
May 16, 2022 -

Hi All,

I was trying redis keyspace notification in redis-cli

so when I tried command

````redis-cli config set notify-keyspace-events KEA` and `redis-cli --csv psubscribe '__key*__:*'` then the notification for all the events was coming in the redis cli

but when I tried the command such that I get notification only when the key is set then nothing happens

the command that I used were as follows

`redis-cli config set notify-keyspace-events Ks` and `redis-cli --csv psubscribe '__key*__:*'` can anyone tell why this is happening.

🌐
Appetenza
appetenza.com › how-to-enabling-keyspace-notifications-for-expired-events-in-redis
How to Enabling Keyspace Notifications for Expired Events in Redis?
July 16, 2024 - Open your Redis configuration file (redis.conf). Locate the line containing notify-keyspace-events.
🌐
Heroku Dev Center
devcenter.heroku.com › changelog-items › 2031
Keyspace notifications are now supported on Heroku Redis | Heroku Dev Center
February 16, 2021 - Keyspace notifications can now be enabled for Heroku Redis. You can run heroku redis:keyspace-notifications --help to see descriptions of all the config options. See Heroku CLI Commands for more info. New Go versions available Python 3.6.13 and 3.7.10 are now available
🌐
GitHub
gist.github.com › JonCole › 0d6205b4771e5c803bc1e085517484a2
Redis Keyspace Notification Example · GitHub
Redis Keyspace Notification Example. GitHub Gist: instantly share code, notes, and snippets.
🌐
Redis
redis.io › docs › latest › develop › pubsub › keyspace-notifications › index.html.md
Redis
Notifications are enabled using the `notify-keyspace-events` of redis.conf or via the **CONFIG SET**. Setting the parameter to the empty string disables notifications.