public class GrpcMessageSizeInterceptor extends Object implements io.grpc.ClientInterceptor
If an outbound message exceeds the maximum message size, a GrpcMessageSizeExceededException
is thrown.
Then, if the message's size exceeds the warning threshold, a warning is logged with a stack trace to debug the issue.
Inbound messages are only logged as warnings if they exceed the warning threshold.
When during initialization, the message size is greater than the default configuration of Axon Server, we inform the user that this can cause issues if they don't increase the maximum message size on the server.
The performance overhead of this interceptor is minimal, as it uses a simple check that GRPC does while sending the message anyway.
Constructor and Description |
---|
GrpcMessageSizeInterceptor(int maxMessageSizeInBytes,
double maxMessageSizeWarningPercentage) |
Modifier and Type | Method and Description |
---|---|
<REQ,RESP> io.grpc.ClientCall<REQ,RESP> |
interceptCall(io.grpc.MethodDescriptor<REQ,RESP> methodDescriptor,
io.grpc.CallOptions callOptions,
io.grpc.Channel channel) |
Copyright © 2010–2025. All rights reserved.