Discussion:
[redis-db] combine keyspace events with key pattern
josie kat
2018-11-05 14:01:16 UTC
Permalink
I want to listen to keyspace expiration events that capture keys .
https://redis.io/topics/notifications


this a line in ruby I'm using:

psubscribe("***@0__:expired")



*however I'm not interested in all keys expirations but keys that have a string like "mykey"*


*how do i to combine both keyevents and key pattern matching?*


*currently I capure keys and do if key has a string **"mykey" to filter keys.*
--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+***@googlegroups.com.
To post to this group, send email to redis-***@googlegroups.com.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
Itamar Haber
2018-11-05 17:18:40 UTC
Permalink
Hello Josie,

There is another alternative, i.e. `subscribe '***@0__:mykey` and
then filter the message for events of type "expire".

There is no combined filtering that can be done server-side (excluding
developing a new Redis module).

Cheers,
Post by josie kat
I want to listen to keyspace expiration events that capture keys .
https://redis.io/topics/notifications
*however I'm not interested in all keys expirations but keys that have a string like "mykey"*
*how do i to combine both keyevents and key pattern matching?*
*currently I capure keys and do if key has a string **"mykey" to filter keys.*
--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
--
*Itamar Haber*
Technicalist Evangely

Phone: +972.54.567.9692

[image: Redis Labs] <https://redislabs.com/>
--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+***@googlegroups.com.
To post to this group, send email to redis-***@googlegroups.com.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
josie kat
2018-11-06 07:22:21 UTC
Permalink
Thanks alot itamar,
it solves one problem however it creates another.
hopefully redis will add the feature.
yossi.
Post by Itamar Haber
Hello Josie,
then filter the message for events of type "expire".
There is no combined filtering that can be done server-side (excluding
developing a new Redis module).
Cheers,
Post by josie kat
I want to listen to keyspace expiration events that capture keys .
https://redis.io/topics/notifications
*however I'm not interested in all keys expirations but keys that have a string like "mykey"*
*how do i to combine both keyevents and key pattern matching?*
*currently I capure keys and do if key has a string **"mykey" to filter keys.*
--
You received this message because you are subscribed to the Google Groups
"Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an
<javascript:>.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
--
*Itamar Haber*
Technicalist Evangely
Phone: +972.54.567.9692
[image: Redis Labs] <https://redislabs.com/>
--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+***@googlegroups.com.
To post to this group, send email to redis-***@googlegroups.com.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
Loading...