Repository: quarkusio/quarkus
Issue: Quarkus GRPC client is setting wrong values for maxInboundMetadataSize and maxInboundMessageSize

**Describe the bug**
The GRPC Channels class is setting user settings wrongly (quarkus/extensions/grpc/runtime/src/main/java/io/quarkus/grpc/runtime/supports/Channels.java):

```
.maxInboundMetadataSize(config.maxInboundMessageSize.orElse(DEFAULT_MAX_HEADER_LIST_SIZE))
.maxInboundMetadataSize(config.maxInboundMessageSize.orElse(DEFAULT_MAX_MESSAGE_SIZE))
```
Because of that the quarkus.grpc.clients."service-name".max-inbound-message-size setting does nothing.

And the server part doesn't have a way of setting the max inbound metadata size.

**Expected behavior**
The runtime config uses the maxInboundMessageSize config so the the maxInboundMessageSize parameter, and the maxInboundMetadataSize config to set the maxInboundMetadataSize parameter

**Actual behavior**
The runtime config doesn't set the maxInboundMessageSize and uses the maxInboundMessageSize to set maxInboundMetadataSize


**To Reproduce**

Steps to reproduce the behavior:
1. Set the quarkus.grpc.clients."service-name".max-inbound-message-size config to 8mb
2. It won't set the max-inbound-message-size
3. Receive a message greater than 4mb and it will fail

Changed files:
extensions/grpc/runtime/src/main/java/io/quarkus/grpc/runtime/config/GrpcServerConfiguration.java
extensions/grpc/runtime/src/main/java/io/quarkus/grpc/runtime/supports/Channels.java
extensions/grpc/runtime/src/main/java/io/quarkus/grpc/runtime/GrpcServerRecorder.java

diff --git a/extensions/grpc/runtime/src/main/java/io/quarkus/grpc/runtime/GrpcServerRecorder.java b/extensions/grpc/runtime/src/main/java/io/quarkus/grpc/runtime/GrpcServerRecorder.java
index 180b756ac87..75c5619dacf 100644
--- a/extensions/grpc/runtime/src/main/java/io/quarkus/grpc/runtime/GrpcServerRecorder.java
+++ b/extensions/grpc/runtime/src/main/java/io/quarkus/grpc/runtime/GrpcServerRecorder.java
@@ -278,6 +278,11 @@ public void handle(HttpServerOptions options) {
         if (configuration.maxInboundMessageSize.isPresent()) {
             builder.maxInboundMessageSize(configuration.maxInboundMessageSize.getAsInt());
         }
+
+        if (configuration.maxInboundMetadataSize.isPresent()) {
+            builder.maxInboundMetadataSize(configuration.maxInboundMetadataSize.getAsInt());
+        }
+
         Optional<Duration> handshakeTimeout = configuration.handshakeTimeout;
         if (handshakeTimeout.isPresent()) {
             builder.handshakeTimeout(handshakeTimeout.get().toMillis(), TimeUnit.MILLISECONDS);
diff --git a/extensions/grpc/runtime/src/main/java/io/quarkus/grpc/runtime/config/GrpcServerConfiguration.java b/extensions/grpc/runtime/src/main/java/io/quarkus/grpc/runtime/config/GrpcServerConfiguration.java
index 37f3d6ac6a6..ef18c860947 100644
--- a/extensions/grpc/runtime/src/main/java/io/quarkus/grpc/runtime/config/GrpcServerConfiguration.java
+++ b/extensions/grpc/runtime/src/main/java/io/quarkus/grpc/runtime/config/GrpcServerConfiguration.java
@@ -34,6 +34,12 @@ public class GrpcServerConfiguration {
      */
     public @ConfigItem OptionalInt maxInboundMessageSize;
 
+    /**
+     * The max inbound metadata size in bytes
+     */
+    @ConfigItem
+    public OptionalInt maxInboundMetadataSize;
+
     /**
      * The SSL/TLS config.
      */
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 203c483995d..464c79fb500 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
@@ -69,8 +69,8 @@ public static Channel createChannel(String name) throws SSLException {
                 .keepAliveWithoutCalls(config.keepAliveWithoutCalls)
                 .maxHedgedAttempts(config.maxHedgedAttempts)
                 .maxRetryAttempts(config.maxRetryAttempts)
-                .maxInboundMetadataSize(config.maxInboundMessageSize.orElse(DEFAULT_MAX_HEADER_LIST_SIZE))
-                .maxInboundMetadataSize(config.maxInboundMessageSize.orElse(DEFAULT_MAX_MESSAGE_SIZE))
+                .maxInboundMetadataSize(config.maxInboundMetadataSize.orElse(DEFAULT_MAX_HEADER_LIST_SIZE))
+                .maxInboundMessageSize(config.maxInboundMessageSize.orElse(DEFAULT_MAX_MESSAGE_SIZE))
                 .negotiationType(NegotiationType.valueOf(config.negotiationType.toUpperCase()));
 
         if (config.retry) {