This project is marked with ms_
in its repository name to indicate that it's an implementation of a microservice architecture. The email-user
microservice is responsible for creating users and send a MESSAGE to a queue in rabbit MQ
The microservice architecture is a powerful approach that allows for the decoupling of different functionalities. In this project, we've separated the user creation and email notification services. This separation ensures that if one microservice (e.g., user creation) experiences issues, it won't affect the other services. This robustness is one of the main reasons why microservice architecture is widely used in modern software development.
- User creation via POST request
- Automatic email notification upon user creation
- Integration with RabbitMQ for message queuing
POST http://localhost:8080/users/
: Creates a new user and triggers an email notification
This microservice uses RabbitMQ for message queuing. The message queue can be monitored at https://toad.rmq.cloudamqp.com/#/queues
The project follows a comprehensive folder structure:
configs
: Contains RabbitMQ configurationdtos
: Data Transfer Objects for controlling the flow in the controller, ensuring only necessary data is transferredmodels
: Responsible for creating the table in the PostgreSQL databaseproducer
: Handles sending messages to RabbitMQrepository
: Manages data persistence in the databaseservice
: Processes data and prepares messages before sending them to RabbitMQ
- Spring Boot
- PostgreSQL
- RabbitMQ
- Docker (for containerization)