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
When a client issues a `SUBSCRIBE` or `PSUBSCRIBE`, that connection is put into a "subscriber" mode.
404
-
At that point, only commands that modify the subscription set are valid. When the subscription
404
+
At that point, only commands that modify the subscription set are valid and quit (and depending on the redis version ping as well). When the subscription
405
405
set is empty, the connection is put back into regular mode.
406
406
407
-
If you need to send regular commands to Redis while in subscriber mode, just open another connection.
407
+
If you need to send regular commands to Redis while in subscriber mode, just open another connection with a new client (hint: use `client.duplicate()`).
408
408
409
409
## Subscriber Events
410
410
@@ -413,13 +413,13 @@ If a client has subscriptions active, it may emit these events:
413
413
### "message" (channel, message)
414
414
415
415
Client will emit `message` for every message received that matches an active subscription.
416
-
Listeners are passed the channel name as `channel` and the message Buffer as `message`.
416
+
Listeners are passed the channel name as `channel` and the message as `message`.
417
417
418
418
### "pmessage" (pattern, channel, message)
419
419
420
420
Client will emit `pmessage` for every message received that matches an active subscription pattern.
421
421
Listeners are passed the original pattern used with `PSUBSCRIBE` as `pattern`, the sending channel
422
-
name as `channel`, and the message Buffer as `message`.
0 commit comments