Skip to content

Commit

Permalink
Use single HTTP server for gRPC services
Browse files Browse the repository at this point in the history
Solves issue #1373
  • Loading branch information
gtroitsk committed Oct 15, 2023
1 parent 3e64f9b commit cb4e406
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ public void noExtensions() {
@Test
public void extensionSetA() {
QuarkusCliRestService app = createAppWithExtensions(EXTENSION_SET_A);
startDevMode(app);
// Extension set has gRPC, use new approach with single HTTP server instance
startDevMode(app.withProperty("quarkus.grpc.server.use-separate-server", "false"));
verifyValidPayloadPresent(app);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ HttpVersionClientServiceAsync/mp-rest/trustStore=classpath:/META-INF/resources/s
HttpVersionClientServiceAsync/mp-rest/trustStorePassword=password
# gRPC
quarkus.grpc.clients.hello.host=localhost
quarkus.grpc.clients.hello.port=${quarkus.grpc.server.port}
quarkus.grpc.clients.hello.port=${quarkus.http.port}
quarkus.grpc.server.enable-reflection-service=true
quarkus.grpc.clients.reflection-service.host=localhost
quarkus.grpc.clients.reflection-service.port=${quarkus.grpc.server.port}
quarkus.grpc.clients.reflection-service.port=${quarkus.http.port}
quarkus.grpc.server.use-separate-server=false
# authZ
quarkus.keycloak.policy-enforcer.enable=true
# Non-application endpoints. Required because we are going to force a redirection, otherwise use `/q/*` instead
Expand Down
3 changes: 2 additions & 1 deletion http/http-advanced/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ HttpVersionClientServiceAsync/mp-rest/trustStore=classpath:/META-INF/resources/s
HttpVersionClientServiceAsync/mp-rest/trustStorePassword=password
# gRPC
quarkus.grpc.clients.hello.host=localhost
quarkus.grpc.clients.hello.port=${quarkus.grpc.server.port}
quarkus.grpc.clients.hello.port=${quarkus.http.port}
quarkus.grpc.server.use-separate-server=false
# authZ
quarkus.keycloak.policy-enforcer.enable=true
# Non-application endpoints. Required because we are going to force a redirection, otherwise use `/q/*` instead
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@ io.quarkus.ts.opentelemetry.reactive.sse.ServerSentEventsPongClient/mp-rest/scop

# gRPC
quarkus.grpc.clients.pong.host=localhost
quarkus.grpc.clients.pong.port=${quarkus.http.port}
quarkus.grpc.server.use-separate-server=false

quarkus.application.name=pingpong
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@ io.quarkus.ts.opentelemetry.sse.ServerSentEventsPongClient/mp-rest/scope=jakarta

# gRPC
quarkus.grpc.clients.pong.host=localhost
quarkus.grpc.clients.pong.port=${quarkus.http.port}
quarkus.grpc.server.use-separate-server=false

quarkus.application.name=pingpong
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,6 @@ io.quarkus.ts.monitoring.opentracing.reactive.grpc.ping.clients.ServerSentEvents
io.quarkus.ts.monitoring.opentracing.reactive.grpc.ping.clients.ServerSentEventsPongClient/mp-rest/scope=jakarta.inject.Singleton

# gRPC
quarkus.grpc.clients.pong.host=localhost
quarkus.grpc.clients.pong.host=localhost
quarkus.grpc.clients.pong.port=${quarkus.http.port}
quarkus.grpc.server.use-separate-server=false

0 comments on commit cb4e406

Please sign in to comment.