Skip to content

Commit

Permalink
Add a note about multiple Pub/Sub channel listeners (#2433)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
jamesw6811 and leibale committed May 29, 2023
1 parent 0298c1a commit 454617b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/pub-sub.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 454617b

Please sign in to comment.