This project illustrates how to expose and consume TLS-secured gRPC services with Quarkus.
The application can be started using:
mvn quarkus:dev
You can access the REST endpoint with curl
:
curl localhost:8080/hello/blocking/World
or
curl localhost:8080/hello/mutiny/World
The project has gRPC server reflection enabled (see application.properties
), so you can also access
the gRPC service directly with grpcurl.
grpcurl --cacert src/main/resources/tls/ca.pem -d '{"name": "World!"}' localhost:9000 helloworld.Greeter/SayHello
The application has of 2 components:
HelloWorldService
- a hello-world gRPC serviceHelloWorldEndpoint
- a REST endpoint that uses Quarkus gRPC client to communicate with the service
The project is configured with application.properties
.
You can compile the application into a native binary using:
mvn clean install -Pnative
and run with:
./target/grpc-tls-quickstart-1.0-SNAPSHOT-runner