Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add example scripts showing pub/sub usage. #2287

Closed
simonprickett opened this issue Oct 5, 2022 · 2 comments
Closed

Add example scripts showing pub/sub usage. #2287

simonprickett opened this issue Oct 5, 2022 · 2 comments

Comments

@simonprickett
Copy link
Contributor

Add two new scripts to the examples folder to demonstrate pub/sub usage. Call them pubsub-publisher.js and pubsub-subscriber.js.

Have the publisher publish a large number of message on a variety of channel names, and the subscriber use the PSUBSCRIBE command to subscribe to them.

Use the existing Redis Streams example scripts stream-producer.js and stream-consumer.js as guidelines, and also pay attention to the guidelines for adding an example to ensure that your contribution can be merged.

This is part of our participation in Hacktoberfest 2022. Learn how to complete this issue here: https://redis.io/community/hacktoberfest/

Need help or want to talk to us? Join us on Discord where we have a dedicated Hacktoberfest channel: https://discord.gg/ueQwKUh5Z3

If you're interested in taking this issue on, please mention @simonprickett and @SuzeShardlow in the comments and ask to be assigned.

@con-mark
Copy link
Contributor

con-mark commented Oct 5, 2022

Hi @simonprickett if you assign this I can start looking at it

@simonprickett
Copy link
Contributor Author

@con-mark I've assigned this to you, looking forward to seeing your PR in the next couple of days. Have fun and please check out our guidelines:

https://redis.io/community/hacktoberfest/

supercoder1213 added a commit to supercoder1213/redis that referenced this issue Feb 1, 2023
* #2287 Add example scripts showing pub/sub usage.
redis/node-redis#2287

* #2287 Add example scripts showing pub/sub usage.
Fixing comments requested
Adding client.connect() to pubsub-subscriber.js
Reformatting Readme
updating logging in pubsub-publisher.js

* #2287 Add example scripts showing pub/sub usage.
Fix publish and subscriber
Update tidy up comments

* Update examples/pubsub-subscriber.js

Making suggested changes

Co-authored-by: Simon Prickett <simon@crudworks.org>

Co-authored-by: Simon Prickett <simon@crudworks.org>

Closes #2287.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants