Redis Keyspace Notifications

87 views
Skip to first unread message

Александр Нижегородцев

unread,
Sep 30, 2016, 5:03:00 AM9/30/16
to Redis DB
HI!
I'm using Redis as distributed cache. I have different applications which listen only particular keys. For example:
App1 listen App1.*
App2 listen App2.* and so on.

And my applications using following pattern to receive notifications:
App1:  "_key*_:*APP1.*"
App2:  "_key*_:*APP2.*"

I need to send notifications only about set, del, expired, evicted events that is why I have tried to use notify-keyspace-events "AK". If works fine for me but in this case of "AK" configuration redis starts to send extra notifications like "expire" which I don't need.

So according to documentation http://redis.io/topics/notifications I have tried to implement custom property:

notify-keyspace-events "Ksxe"  to send only set, expired and evicted notifications. But in fact in this case I receive only expired notifications..

Questions:
1. Why I doesn't receive set and evicted  events?? Why I receive only expired events?
2. Is there any way to make redis send only del notifications??

I also have tried "Ks" but redis doesn't send notifications about set events
A     Alias for g$lshzxe, so that the "AKE" string means all the events.
"Kg$lshzxe" doesn't works correctly too..

The Real Bill

unread,
Oct 1, 2016, 11:30:48 AM10/1/16
to Redis DB
As I noted on StackExchange you are misunderstanding the "s" flag. Change s -> "$" and add "g".
Reply all
Reply to author
Forward
0 new messages