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
The current implementation doesn't keep a callback for UNSUBSCRIBE command, the reason from the code base comments is that: every channel will receive an unsubscribe msg.
This design cause two problem:
Callback passed with unsubscribe command never trigged.
If the channel hasn't been subscribed, then we don't have a chance to handle related msg. As no callback for that channel yet.
The text was updated successfully, but these errors were encountered:
#1012 didn't change how the pubsub handling was done from start for RESP2,
but it made sure unsubscribe in RESP3 works the same (no longer calling the registered push-callback).
It's correctly stated in bullet 1 that an unsubscribe response will call the subscribe-callback given when starting the subscription, i.e it's not using the callback given when sending the unsubscribe message.
..and in bullet 2 that sending an unsubscribe for a channel not subscribed to will not trigger any subscribe-callback, nor the given callback when sending the unsubscribe. (Sending an unsubscribe with no subscriptions at all will result in a REDIS_ERR)
I guess this would be a breaking change and probably needs some detailed reasons and benefits.
The current implementation doesn't keep a callback for
UNSUBSCRIBE
command, the reason from the code base comments is that: every channel will receive an unsubscribe msg.This design cause two problem:
The text was updated successfully, but these errors were encountered: