From 5065e14ec493961e488cb04a046f70bfd09004f5 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..3cc1514affd57 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 @@ -31,6 +31,7 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; +import io.vertx.grpc.client.GrpcClientOptions; import jakarta.enterprise.context.spi.CreationalContext; import org.eclipse.microprofile.context.ManagedExecutor; @@ -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();