Skip to content

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…

License

Notifications You must be signed in to change notification settings

by22shh/user-microservices-with-camel

Repository files navigation

Microservices for working with users + Apache Camel

Microservice architecture project that contains a web service and processing service. Spring(web, data), RabbitMQ, Apache Camel.

REST API Reference

Response Codes

200: Success
400: Bad request
404: Cannot be found

Create user


Request URL:

POST /api/v1/users

Request Body:

{
    "name": "Ivan",
    "surname": "Ivanov", 
    "patronymic": "Ivanovich", 
    "email": "[email protected]"
 }

Successful Response:

Status: 200

{   "id": 1,
    "name": "Ivan",
    "surname": "Ivanov", 
    "patronymic": "Ivanovich", 
    "email": "[email protected]"
 }

Failed Response:

Status: 400

{
    "message": "User with email [[email protected]] has already been created"
}

Update user


Request URL:

PUT /api/v1/users/{id}

Request Body:

{
    "name": "Nikita",
    "surname": "Ivanov", 
    "patronymic": "Ivanovich", 
    "email": "[email protected]"
 }

Successful Response:

Status: 200

{   "id": 1,
    "name": "Nikita",
    "surname": "Ivanov", 
    "patronymic": "Ivanovich", 
    "email": "[email protected]"
 }

Failed Response:

Status: 404

{
    "message": "User with id [2] not found"
}

Get user


Request URL:

GET /api/v1/users/{id}

Successful Response:

Status: 200

{
    "id": 1,
    "name": "Nikita",
    "surname": "Ivanov", 
    "patronymic": "Ivanovich", 
    "email": "[email protected]"
}

Failed Response:

Status: 404

{
    "message": "User with id [2] not found"
}

Delete user


Request URL:

DELETE /api/v1/users/{id}

Successful Response:

Status: 200

Failed Response:

Status: 404

{
    "message": "User with id [2] not found"
}

License

MIT


GitHub: @baymxs VK: @baymxs

About

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…

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages