Welcome to my personal RabbitMQ Event-Driven Learning Project This repository is dedicated to my journey of exploring and gaining hands-on experience with event-driven architectures using RabbitMQ.
My project aims to deepen my understanding of event-driven systems, especially focusing on asynchronous communication between services facilitated by RabbitMQ. As I navigate through messaging, queues, and system integration, this project is tailored to support my learning objectives.
Join me on this learning journey with practical examples. These examples guide me through setting up and utilizing RabbitMQ for sending and receiving messages, laying down a solid foundation for my learning path.
Each example comes with detailed documentation. I'm learning about the purpose of the code, how to execute it, and what outcomes to anticipate. My goal is to equip myself with the knowledge and skills needed to navigate the world of RabbitMQ effectively.
Make sure you have RabbitMQ installed on your machine. Follow these steps to get started:
Use Docker Compose to easily spin up a RabbitMQ server container.
cd rabbitmq && docker compose up -d-
Open deposit service folder
cd deposit-service -
Install Dependencies
Choose your package manager:
npm install
or
yarn
or
pnpm install
-
Start the Deposit Service Server
npm run dev
or
yarn dev
or
pnpm run dev
-
Open consumers example folder
cd consumers -
Install Dependencies
Similar to deploying the server, choose your preferred package manager.
-
Execute the Consumer
Listen to deposit events with the following command:
npm run dev:consumer:deposit
or
yarn dev:consumer:deposit
or
pnpm run dev:consumer:deposit
Interact with the deposit service via an HTTP POST request. Use tools like Postman or Insomnia to send a deposit request to the /deposit endpoint:
POST /deposit
{
"clientId": "client1",
"amount": 1000
}Monitor the logs of the deposit consumer server to observe the processing of your deposit event.
