spring-cloud-gateway
spring-cloud-gateway copied to clipboard
Add ManagedChannelContainer to JsonToGrpcGatewayFilterFactory. #3120
- Related to issue #3120
- Add
ManagedChannelContainertoJsonToGrpcGatewayFilterFactory.GRPCResponseDecoratorto prevent creatingManagedChannels on every call. - Used
java.util.concurrent.ConcurrentHashMapfor Thread-safe.
@Albertoimpl or @abelsromero could one of you review?
Using ManagedChannels is an excellent idea and should definitely improve the performance. Thanks a lot for the great contribution!
However, I was running the tests and now GRPCApplicationTests fails treating the exception when there is a runtime error.
@Albertoimpl Thank you for reviewing this PR. I modified codes for checkstyle compliance.
GRPCApplicationTests passed for me like below:
can you give me more details to reproduce failure case?
Everything looks great now after the updates @nsce9806q 👏🏽