This module illustrates the construction of API gateway using Quarkus, RESTEasy Reactive, the Reactive REST Client and Fault Tolerance. The system is composed by:
- a quote service
- a greeting service
- the api gateway
In a terminal, navigate to the chapter-12/api-gateway-example/quote-service directory and run:
> mvn package
> java -jar target/quarkus-app/quarkus-run.jar
The application is listening on the port 9020.
In another terminal, navigate to the chapter-12/api-gateway-example/greeting-service directory and run:
> mvn package
> java -jar target/quarkus-app/quarkus-run.jar
The application is listening on the port 9010.
In a third terminal, navigate to the chapter-12/api-gateway-example/api-gateway directory and run:
> mvn quarkus:dev # Or package and run it.
Invoke the application as follows:
> curl http://localhost:8080 # Call both services
> curl http://localhost:8080/quote # Just call the quote service