This was an experimental project for me to play with Dropwizard and Kotlin.
Toy microservice that models product information in a supply chain context.
I abandoned my work with Javalin and switched to Dropwizard https://bitbucket.org/honstain/javalin-inventory-service-v2/src/master/
Version 2.0.23 Java framework for high-performance RESTful web services.
I use the Dropwizard Metrics library to report to Graphite
- https://www.dropwizard.io/projects/metrics/en/latest/manual/core.html
- https://www.dropwizard.io/projects/metrics/en/latest/manual/jersey.html
- https://metrics.dropwizard.io/4.2.0/manual/graphite.html#manual-graphite
There is a grafana dashboard record in grafanaDashboard.json that you can use to recreate the dashboard. This was the guide I used to run Grafana locally (Grafana and Graphite via docker-compose) https://www.linode.com/docs/guides/install-graphite-and-grafana/
This uses the Dropwizard version of the Kafka client that utilizes the Apache Kafka client.
WARNING The integration test assumes there is a Kafka cluster to interact with, if you want to change that you can modify product-service-test-config.yml
I have included in the folder docker-compose_stuff
the configuration for the Grafan+Graphite stack and the Kafka+Kowl stack.
- Run
mvn clean install
to build your application - Start application with
java -jar target/kotlin-product-service-1.0-SNAPSHOT.jar server config.yml
- To check that your application is running enter url
http://localhost:7070
To see your applications health enter url http://localhost:7071/healthcheck