From b26c4210080e454b9c0e5d619b32fc02238ef56a Mon Sep 17 00:00:00 2001 From: Alexander Pankin Date: Sun, 1 Dec 2024 14:15:05 +0300 Subject: [PATCH] Respect max message size property fo Quarkus GRPC client (44853) --- .../main/java/io/quarkus/grpc/runtime/supports/Channels.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/extensions/grpc/runtime/src/main/java/io/quarkus/grpc/runtime/supports/Channels.java b/extensions/grpc/runtime/src/main/java/io/quarkus/grpc/runtime/supports/Channels.java index c7e3b159759bd..e7cc902b6384a 100644 --- a/extensions/grpc/runtime/src/main/java/io/quarkus/grpc/runtime/supports/Channels.java +++ b/extensions/grpc/runtime/src/main/java/io/quarkus/grpc/runtime/supports/Channels.java @@ -79,6 +79,7 @@ import io.vertx.core.net.PemTrustOptions; import io.vertx.core.net.SocketAddress; import io.vertx.grpc.client.GrpcClientChannel; +import io.vertx.grpc.client.GrpcClientOptions; @SuppressWarnings({ "OptionalIsPresent" }) public class Channels { @@ -335,7 +336,9 @@ public static Channel createChannel(String name, Set perClientIntercepto options.setMetricsName("grpc|" + name); Vertx vertx = container.instance(Vertx.class).get(); - io.vertx.grpc.client.GrpcClient client = io.vertx.grpc.client.GrpcClient.client(vertx, options); + io.vertx.grpc.client.GrpcClient client = io.vertx.grpc.client.GrpcClient.client(vertx, + new GrpcClientOptions().setTransportOptions(options) + .setMaxMessageSize(config.maxInboundMessageSize.orElse(DEFAULT_MAX_MESSAGE_SIZE))); Channel channel; if (stork) { ManagedExecutor executor = container.instance(ManagedExecutor.class).get();