Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/slaveofcode/nsq-multi-subscriber
Prove of concept NSQ with multiple worker subscriber
https://github.com/slaveofcode/nsq-multi-subscriber
express expressjs node nodejs nsq nsqjs publish pubsub subscribe
Last synced: about 1 month ago
JSON representation
Prove of concept NSQ with multiple worker subscriber
- Host: GitHub
- URL: https://github.com/slaveofcode/nsq-multi-subscriber
- Owner: slaveofcode
- License: mit
- Created: 2019-06-13T10:43:41.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-10T18:59:52.000Z (about 2 years ago)
- Last Synced: 2024-04-24T05:36:58.208Z (8 months ago)
- Topics: express, expressjs, node, nodejs, nsq, nsqjs, publish, pubsub, subscribe
- Language: JavaScript
- Size: 894 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# NSQ Subscriber Simulation
This is a simple project which simulate the process of multiple NSQ subscribers. The project is based on Express framework (NodeJs), and prepared with simple subscriber & publisher.
## Installation
1. Run the `nsqd` & `nsqlookupd` daemon process on your machine (see: [nsq.io](https://nsq.io))
2. Clone this project and run `npm i` or `npm install` to install module dependencies
3. Make copy of `.env.example` with a new name called `.env` then configure the environment variables inside, for the nsqlookupd address(es).
4. Run the server by execute `npm run server1` to start **server1**
5. Open new console/terminal then execute `npm run server2` to start **server2**
6. Now you have 2 different running process, which is subscribed to `MESSAGE` topic in NSQ.## Start simulation
After you see both process server running on these 2 console/terminals, you can start simulation of publishing message by executing the script inside `tool` folder.>> node tool/publisher_simulator.js
## Example Demo
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details