1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-09 00:22:08 +03:00

Add a note about multiple Pub/Sub channel listeners (#2433)

* Add multiple listener language to pub/sub docks

Clarify that multiple subscriptions create multiple listeners.

* Update pub-sub.md

---------

Co-authored-by: Leibale Eidelman <me@leibale.com>
This commit is contained in:
James White
2023-05-29 09:04:30 -04:00
committed by GitHub
parent 0298c1ac41
commit 454617bf83

View File

@@ -39,6 +39,8 @@ await client.pSubscribe('channe*', listener);
await client.sSubscribe('channel', listener);
```
> ⚠️ Subscribing to the same channel more than once will create multiple listeners which will each be called when a message is recieved.
## Publishing
```javascript