__keyspace@0__:keyname
channel with the values of the event names for the keyspace
notifications__keyevent@0__:eventname
channel with the values of the key names for the keyevent
notificationsCONFIG SET
command, and set the notify-keyspace-events
options to one of the
appropriate flags described below.
Flag | Description |
---|---|
K | Keyspace events |
E | Keyevent events |
g | Generic command events |
$ | String command events |
l | List command events |
s | Set command events |
h | Hash command events |
z | Sorted set command events |
t | Stream command events |
d | Module(JSON) command events |
x | Expiration events |
e | Eviction events |
m | Key miss events |
n | New key events |
A | Alias for g$lshztxed |
K
or E
flags must be present in the option value.
For example, you can use the following command to receive keyspace notifications
only for the hash commands:
CONFIG SET
command and set notify-keyspace-events
option to empty string
to disable all keyspace and keyevent notifications.
CONFIG GET
command can be used the get the current value of the notify-keyspace-events
option
to see the active keyspace and keyevent notifications configuration.