spring-cloud-gateway icon indicating copy to clipboard operation
spring-cloud-gateway copied to clipboard

Add ManagedChannelContainer to JsonToGrpcGatewayFilterFactory. #3120

Open nsce9806q opened this issue 2 years ago • 4 comments

  • Related to issue #3120
  • Add ManagedChannelContainer to JsonToGrpcGatewayFilterFactory.GRPCResponseDecorator to prevent creating ManagedChannels on every call.
  • Used java.util.concurrent.ConcurrentHashMap for Thread-safe.

nsce9806q avatar Nov 05 '23 06:11 nsce9806q

@Albertoimpl or @abelsromero could one of you review?

spencergibb avatar Mar 08 '24 19:03 spencergibb

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 avatar Mar 11 '24 15:03 Albertoimpl

@Albertoimpl Thank you for reviewing this PR. I modified codes for checkstyle compliance.

GRPCApplicationTests passed for me like below: image

can you give me more details to reproduce failure case?

nsce9806q avatar Mar 14 '24 23:03 nsce9806q

Everything looks great now after the updates @nsce9806q 👏🏽

Albertoimpl avatar Apr 03 '24 09:04 Albertoimpl