The project is developed using java 17. It is required to compile the project.
The project uses docker images for kafka and mysql.
The app is also added to the docker compose for easier testing.
Test containers are also used in integration tests.
.\mvnw clean install
.\mvnw test -Dtest=**/*IT
.\mvnw clean install -DskipTests
docker-compose up --build -d
[NOTE]
Sometimes the app may fail to start if mySQL container is not yet ready.
In that case please start the application image again.
The console producer is used to send messages in JSON format. An example of the JSON object is given below.
docker-compose exec kafka kafka-console-producer --broker-list localhost:9092 --topic test
An example of the JSON object.
{"firstName":"John", "lastName":"Doe"}
A GET API is also added to retrieve saved data from the database
GET http://localhost:8080/users