Welcome to the Message Queue Implementation project! This project showcases the practical implementation of message queues using Node.js. By exploring this project, users can deepen their understanding of consumer and producer concepts, gaining valuable insights into real-world scenarios.
For development, you will need to have Node.js, pnpm
, and Docker installed in your environment.
-
Just go to the official Node.js website and download the installer. Ensure that
git
is available in your PATH aspnpm
might need it. -
You can install Node.js and npm easily with apt install. Run the following commands:
$ sudo apt install nodejs $ sudo apt install npm
-
For more information about installation, visit the official Node.js website and official NPM website.
If the installation was successful, you should be able to run the following commands.
$ node --version
v14.17.0
$ npm --version
7.13.0
$ pnpm --version
6.16.1
If you need to update npm
or pnpm
, you can do it using the respective package manager. After running the following commands, open the command line again.
$ npm install -g npm
$ npm install -g pnpm
After installing Node.js, this project will need pnpm
too. Run the following command:
$ npm install -g pnpm
Install Docker by following the instructions on the official Docker website.
$ git clone https://github.com/YOUR_USERNAME/BullMQ_practices
$ cd BullMQ_practices
$ pnpm install
Open a/nice/path/to/a.file
then edit it with your settings. You will need:
- A setting;
- Another setting;
- One more setting;
Before running the project, make sure you have Docker running. Then, run the following command:
$ docker run -d -p 6379:6379 --name redis-container redis
This command will start a Redis container. Now you can start your project:
$ pnpm start
$ pnpm build
If you want to stop the Redis container, run:
$ docker stop redis-container