Messaging-API
In this simple API, we connect to PostgreSQL and Kafka to obtain and manage cars inventory
This repo is used to showcase some concepts of resiliency and observability all in an effort to ease the reality of folks who need to operate and support the application.
Prerequisites
- Docker environment
- Minikube
Setup
Run PostgreSQL
docker container rm -f cars-postgres
docker run --name cars-postgres -p 5432:5432 -e POSTGRES_PASSWORD=carsdb -d postgres
Run Kafka using the official docker-compose
Run the API
Running the API will initialise the DB using flyway
./mvnw clean verify
./mvnw spring-boot:run
Confirm that the API is up by calling the following GET
curl localhost:8080/cars
TODO
- enable logs and add INFO and DEBUG level logs
- document actuator logger API calls for dynamic log changes
- add unit and integration tests with testcontainers
- take down postgresql and showcase app reaction
- showcase example of custom health check for postgres (connect to postgres AND verify specific table exists)
- document an operations runbook on how to investigate a specific kind of log
- Showcase on a different feature branch useless/lacking logs VS clean logs