I can't find it in the docs but is there event notifications for subscribe event? to be notified when a user subscribes/unsubscribes from a channel/pattern itself?
Comment From: bsergean
I think you can search for notifyKeyspaceEvent in the code base, from notify.c I tried to grep for it in notifyKeyspaceEvent but couldn't find anything, so you seems right that it isn't supported.
However, pubsub do not really works with keys, but with channels, so maybe by design this wouldn't work, unless the channel is used as a fake 'key'.
Comment From: itamarhaber
Hello @gittyup2018
As @bsergean explained there are no events for SUBSCRIBE and I agree that the design of Keyspace Notification is about notifying about keyspace events, while Pub/Sub is unrelated to the keyspace.
Assuming that SUBSCRIBE events were real, what is the problem that you're trying to solve with them?
Comment From: gittyup2018
@itamarhaber
I'm sure there are other use cases but what I was trying to use it for was a presence notification, like if a user subscribed to their own dedicated channel by user id (like for websocket connections), by receiving a subscription event it to know that the user is "online" and to keep track of what clients are subscribed outside of redis/my own application layer.
(Sorry for late reply, I just saw this message)
Comment From: xiaozhitaba
how about follow implement /* SUBSCRIBEPLUS channel OW [owner] EV [envent] FE [field] OW [owner] EV [envent] FE [field] field ==hash field envent == cmd (set del hset ) owne == client uuid