Microservice architecture project that contains a web service and processing service. The web service receives requests from the client and sends them to the message queue and creates a callback queue to receive a response for a specific request from another service. The processing service receives messages from the queue, processes the requests accordingly and sends a response to the callback queue. Spring(web, amqp, data), RabbitMQ.
200: Success
400: Bad request
404: Cannot be found
POST /api/v1/user/create
{
"name": "Ivan",
"surname": "Ivanov",
"patronymic": "Ivanovich",
"email": "ivanov_ivan777@gmail.com"
}
Status: 200
{
"body": null,
"message": "Success"
}
Status: 400
{
"body": null,
"message": "User with email [ivanov_ivan777@gmail.com] has already been created"
}
PUT /api/v1/user/{id}
{
"name": "Nikita",
"surname": "Ivanov",
"patronymic": "Ivanovich",
"email": "ivanov_nikita383@gmail.com"
}
Status: 200
{
"body": null,
"message": "Success"
}
Status: 404
{
"body": null,
"message": "User with id [2] not found"
}
GET /api/v1/user/{id}
Status: 200
{
"body": {
"name": "Nikita",
"surname": "Ivanov",
"patronymic": "Ivanovich",
"email": "ivanov_nikita383@gmail.com"
},
"message": "Success"
}
Status: 404
{
"body": null,
"message": "User with id [2] not found"
}
DELETE /api/v1/user/{id}
Status: 200
{
"body": null,
"message": "Success"
}
Status: 404
{
"body": null,
"message": "User with id [2] not found"
}
MIT