title: Java How to increase the message size of a grpc server in Spring Boot
body: <p>I have a Spring Boot micro-service which listens through GRPC using <a href="https://github.com/LogNet/grpc-spring-boot-starter" rel="nofollow noreferrer">LogNet/grpc-spring-boot-starter</a></p>
  <p>By default GRPC payload maximum size is 4MB. At client side, it's easy to set the response payload size, but I want to increase the request size at the server side.</p>
  <p>At client side,</p>
  <pre><code>ManagedChannel channel = 
     NettyChannelBuilder.forAddress(...)
                          .maxInboundMessageSize(NEW_MAX_MESSAGE_SIZE).build();
  </code></pre>
  <p>By server code:</p>
  <pre><code>@GRpcService
  public class FooService extends FooServiceImplBase {
  
    @Override
    public void foo(GetRequest request, StreamObserver&lt;GetResponse&gt; responseObserver) {
      ...
    }
  }
  </code></pre>