This project demonstrates a simple implementation of RabbitMQ with Node.js to illustrate how message brokers work.
Message brokers like RabbitMQ facilitate communication between applications by enabling asynchronous messaging. This project showcases a basic scenario where messages are exchanged between a sender and a receiver using RabbitMQ.
Before running this project, ensure you have the following installed:
-
Clone the repository:
git clone https://github.com/yourusername/rabbitmq-nodejs-example.git cd rabbitmq-nodejs
-
Change Directory To Sender And Receiver
To Sender
cd rabbit-sender
To Receiver
cd rabbit-receiver
-
Install Dependencies
npm install
-
Start The RabbitMQ Server
Ensure RabbitMQ is running. You can download it from RabbitMQ and follow their installation instructions.
-
Excute Sender And Receiver
Sender Command:
npx ts-node rabbit-sender.ts
Receiver Command:
npx ts-node rabbit-receiver.ts