Perfect! Here's a complete README.md content tailored for your RabbitMQ Node.js project with topic exchange, one producer, and multiple consumers:
# My RabbitMQ App
## Description
This is a **Node.js application** demonstrating a **RabbitMQ Topic Exchange** setup with **one producer** and **multiple consumers**.
Messages are published by the producer with a routing key and consumed by the appropriate consumer(s) based on binding patterns.
---
## Features
- Topic-based message routing with RabbitMQ.
- One producer sending messages.
- Multiple consumers (WhatsApp, Email, Telegram) listening to specific routing patterns.
- Easy to extend with additional channels.
---
## Installation
1. Clone the repository:
```bash
git clone <your-repo-url>
cd my-rabbitmq-app- Install dependencies:
npm install- Make sure RabbitMQ is running (default
amqp://localhost).
npm run dev:producernpm run dev:consumer:whatsapp
npm run dev:consumer:email
npm run dev:consumer:telegramYou can run multiple consumers simultaneously to see the topic exchange in action.
-
Exchange Type:
topic -
Example Routing Keys:
notify.new.whatsappnotify.new.emailnotify.new.telegram
Consumers bind queues to the exchange using patterns like:
notify.*.whatsapp
notify.*.email
notify.*.telegram
"scripts": {
"dev": "nodemon src/server.js",
"dev:producer": "nodemon src/producer/notifyProducer.js",
"dev:consumer:whatsapp": "nodemon src/consumers/whatsappConsumer.js",
"dev:consumer:email": "nodemon src/consumers/emailConsumer.js",
"dev:consumer:telegram": "nodemon src/consumers/telegramConsumer.js"
}MIT
---
If you want, I can also **add badges, usage examples, and a diagram showing producer → exchange → multiple consumers** to make it GitHub-ready and more professional.
Do you want me to add that?