The Users service is a microservice responsible for handling user-related operations such as user creation and publishing event related to it.
The Users service follows a microservices architecture, ensuring loose coupling and high scalability. It uses Laravel, a popular PHP framework, to implement the backend logic and expose the POST /users RESTful API.
The Notifications service acts as a consumer for user creation events generated by the Users service. It uses Laravel to consume RabbitMQ messages and log user creation events.
- Laravel
- PHP:PHP 8.2
- SQLite
- RabbitMQ: RabbitMQ serves as the message broker for communication between both microservices.
- Docker: The application is containerized using Docker to ensure consistent development and deployment environments.
- Composer
To set up and run the application locally, follow these steps:
- Clone the Repository: Clone this repository to your local machine.
git clone https://github.com/SEUNAKINTOLA/microservices-message-bus
- Build the Docker Image: Navigate to the root directory of the cloned repository and build the Docker image.
docker-compose up --build
- Sample call:
http://0.0.0.0:8000/api/users { "email":"testuser@test.com", "firstName":"Test", "lastName":"Test" }