- Clone project and run
docker-compose up
. - Check all is running OK
docker-compose ps
. All services must be inUp
state.
GET
http://localhost:8888/GetStats
POST http://localhost:8888/AddTasks
Content-Type: application/json
{
"taskid": "1",
"description": "Description",
"params": {
"test1": "stringA",
"test2": "stringB"
}
}
Make two services
- Service
A
two endpoints/GetStats
. Returns a single number — the number of successfully processedAddTasks
calls since the service started./AddTasks
. Adds messages to the queue, example:
{
"taskid": "1",
"description": "Description",
"params": {
"test1": "stringA",
"test2": "stringB"
}
}
- Service
B
aka Listener. When reading messages, it prints them tostdout
.
fastapi
, aio-pika
, rabbitmq