-
RabbitMQ Integration: This project demonstrates a real-time, dual-panel system using RabbitMQ as the message broker, Prisma ORM for the admin panel, and Mongoose ORM for the consumer side. It efficiently synchronizes operations between PostgreSQL and MongoDB databases.
-
Project Overview:
The admin panel allows users to perform CRUD operations on projects. All operations are stored in a PostgreSQL database using Prisma ORM. Any changes made trigger an event sent through RabbitMQ to the consumer panel.
The consumer panel listens to RabbitMQ messages and mirrors the CRUD operations performed in the admin panel. It uses Mongoose ORM to manage a MongoDB database, ensuring real-time synchronization with the admin panel.
- Node.js
- PostgreSQL
- MongoDB
- RabbitMQ
- Clone the repository and install dependencies for both panels:
# Clone the repository
git clone https://github.com/iamRajatSharma/rabbitMQ-with-nodeJS.git
# Navigate to the project directory
cd rabbitMQ-with-nodeJS
- Admin Panel Setup (Producer):
cd admin
npx tsc -w
npm start
- Admin Panel Setup (Producer):
cd main_app
npx tsc -w
npm start
- Real-Time Synchronization: Admin panel changes instantly reflect in the consumer panel.
- Dual Database Integration: Uses PostgreSQL (admin) and MongoDB (consumer).
- ORM Usage: Prisma for PostgreSQL and Mongoose for MongoDB.
- RabbitMQ Integration: Reliable message passing between the admin and consumer panels.
- Node.js
- TypeScript
- RabbitMQ
- Prisma ORM
- Mongoose ORM
- PostgreSQL
- MongoDB
- The admin panel sends messages to RabbitMQ whenever a CRUD operation is performed.
- The consumer panel listens to RabbitMQ for messages and applies the same operations to its MongoDB database.
- This ensures data consistency across both systems in real-time.
Feel free to fork this repository and submit pull requests. Contributions and suggestions are always welcome!
This project is licensed under the MIT License.
Developed by Rajat Sharma.
For any queries or suggestions, feel free to reach out!