You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
P?SUBSCRIPTIONS command: list current subscriptions #123
I've am writing a redis client for nodejs, and the trickiest thing is dealing with P?UNSUBSCRIBE replys.
the difficulty is that P?UNSUBSCRIBE makes many replies, so it is necessary to calculate how many replys I should expect,
by keeping a count of the number of current subscriptions, so that when the user asks to UNSUBSCRIBE I can pass them the correct list of channels/patterns that they are subscribed to.
Idealy, I think it's simpler if P?UNSUBSCRIBE does a regular MultiBulk reply, but as that would be a breaking API change, A work around could be a P?SUBSCRIPTIONS command, that would have the same semantics as P?UNSUBSCRIBE but instead reply with a list of channels that would be unsubscribed if you passed the same arguments to P?UNSUBSCRIBE.
Hello, I don't understand very well the issue. Both UNSUBCRIBE and PUNSUBSCRIBE will just emit a single message.
Maybe you used to think that PUNSUBSCRIBE would emit a message for every matching channel?
what I do is count the number of patterns that the user has subscribed to, then if they send an unsubscribe command I will know how many responses there should be.
I'm not sure how to tell what redis version I am on. I'm on ubuntu and installed it via apt-get. is this behavior different in a new version?
please tell me if there is an important reason that pubsub behaves like this.
Activity
antirez commentedon Oct 10, 2011
Hello, I don't understand very well the issue. Both UNSUBCRIBE and PUNSUBSCRIBE will just emit a single message.
Maybe you used to think that PUNSUBSCRIBE would emit a message for every matching channel?
dominictarr commentedon Oct 11, 2011
hi, thanks for responding,
this is what I am seeing:
that is three separate replies, correct?
then when you unsubscribe, without args it will emit a message for each pattern:
what I do is count the number of patterns that the user has subscribed to, then if they send an unsubscribe command I will know how many responses there should be.
I'm not sure how to tell what redis version I am on. I'm on ubuntu and installed it via apt-get. is this behavior different in a new version?
please tell me if there is an important reason that pubsub behaves like this.
cheers, Dominic
Merge pull request redis#123 from mathstuf/intel-windows-packing-sele…
Update RedisTimeSeries to version 8.11.90 (#15969)