This repository is used as a playground to experiment building and testing Spring Batch and Spring Cloud Task applications.
Most of the tests in app
are end-to-end (journey tests) and require the external-system
to be up and running.
Note: the external-system application will run with chaos-monkey
enabled by default to simulate transient failures at runtime.
This is done in order to harness the robustness of the batch application.
Other tests in the application will also require additional processes for the database, queue and workers.
In order to run all the necessary components we can leverage the docker-compose.yaml
file and run this command in the root of the project:
docker compose up
And then in another terminal:
./mvnw -pl app test -P e2e
Metrics are collected by Prometheus
every 5s and Grafana
has been already configured with some custom dashboards
that can be used to monitor the performance of the batch operations:
- JVM (Micrometer)1: used to display general and common metrics for JVMs
- Spring Batch Prometheus2: used to display throughput and some common metrics for batch processing