I am looking at this page: https://redis.io/topics/notifications
I have the following line set in my config file:
notify-keyspace-events "Kx"
When I do this (and then run my application that eventually expires some keys), I see no events:
redis-cli --csv psubscribe '__keyspace*__:*expire*'
However, when I set my config to this:
notify-keyspace-events "Kg"
And then run the same app and redis-cli command, I do see events:
"pmessage","__keyspace*__:*expire*","__keyspace@0__:spring:session:wca:sessions:expires:9d73fefc-459d-4bf4-83ef-b8fcbf06b997","expire"
"pmessage","__keyspace*__:*expire*","__keyspace@0__:spring:session:wca:sessions:expires:9d73fefc-459d-4bf4-83ef-b8fcbf06b997","expire"
"pmessage","__keyspace*__:*expire*","__keyspace@0__:spring:session:idp:sessions:expires:52dbe449-4616-41ef-bfa6-1d7a16a89f8a","expire"
"pmessage","__keyspace*__:*expire*","__keyspace@0__:spring:session:idp:sessions:expires:52dbe449-4616-41ef-bfa6-1d7a16a89f8a","expire"
"pmessage","__keyspace*__:*expire*","__keyspace@0__:spring:session:idp:sessions:expires:52dbe449-4616-41ef-bfa6-1d7a16a89f8a","expire"
"pmessage","__keyspace*__:*expire*","__keyspace@0__:spring:session:idp:sessions:expires:52dbe449-4616-41ef-bfa6-1d7a16a89f8a","expire"
I understand that the expirations don't necessarily happen right when the TTL has elapsed. But I'm not sure that explains what I'm seeing -- my redis-cli is looking only for "expire" events, and it consistently sees them when (and only when) I notify generic commands. That's too chatty for my app; I just want to see expires.
Any help is appreciated. Thanks!