This project illustrates how to expose and consume 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 --plaintext -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-plain-text-quickstart-1.0.0-SNAPSHOT-runner