Java-Quarkus-Reactive-CQRS-EventSourcing
Java-Quarkus-Reactive-CQRS-EventSourcing copied to clipboard
Java-Quarkus-Reactive-CQRS-EventSourcing
Java Quarkus CQRS and EventSourcing microservice example 👋💫✨
👨💻 Full list what has been used:
- Quarkus - Supersonic Subatomic Java.
- RESTEasy Reactive - RESTEasy Reactive in Quarkus
- Reactive PostgreSQL Client -The Reactive PostgreSQL Client.
- quarkus-mongodb-client - MongoDB client
- hibernate-validator - Hibernate validator
- OpenAPI and Swagger UI - OpenAPI and Swagger UI
- Micrometer metrics - Micrometer metrics
- OpenTracing - Jaeger OpenTracing
- Kafka Reactive - SmallRye Reactive Messaging to interact with Apache Kafka.
- Docker - Docker
- Prometheus - Prometheus
- Grafana - Grafana
- Jaeger - Jaeger tracing
- Flyway - database migrations.
- SmallRye Fault Tolerance - Fault Tolerance.
Swagger UI:
http://localhost:8006/q/swagger-ui
Jaeger UI:
http://localhost:16686
Prometheus UI:
http://localhost:9090
Grafana UI:
http://localhost:3005
For local development:
make local // runs docker-compose.yml
./mvnw compile quarkus:dev // run microservice
Running the application in dev mode
You can run your application in dev mode that enables live coding using:
./mvnw compile quarkus:dev
NOTE: Quarkus now ships with a Dev UI, which is available in dev mode only at http://localhost:8080/q/dev/.
Packaging and running the application
The application can be packaged using:
./mvnw package
It produces the quarkus-run.jar file in the target/quarkus-app/ directory.
Be aware that it’s not an über-jar as the dependencies are copied into the target/quarkus-app/lib/ directory.
The application is now runnable using java -jar target/quarkus-app/quarkus-run.jar.
If you want to build an über-jar, execute the following command:
./mvnw package -Dquarkus.package.type=uber-jar
The application, packaged as an über-jar, is now runnable using java -jar target/*-runner.jar.
Creating a native executable
You can create a native executable using:
./mvnw package -Pnative
Or, if you don't have GraalVM installed, you can run the native executable build in a container using:
./mvnw package -Pnative -Dquarkus.native.container-build=true