Hi dragon-zhang After I reviewed the code, I had a little doubt,
if used `HttpClient` , it be used by divide and spring cloud plugin, and then used by websocket plugin, Is not as good as the original isolation? (I can't confirm). Looking forward to your reply. thanks! 邪龙(dragon-zhang) <[email protected]> 于2022年4月11日周一 22:56写道: > > Hello community: > > > This is a discussion on whether to reuse HttpClient > for WebSocketPluginConfiguration. > > > > current WebSocketPluginConfiguration: > > > @Bean > public ReactorNettyWebSocketClient > reactorNettyWebSocketClient(final ShenyuConfig shenyuConfig) { > final ReactorNettyWebSocketClient webSocketClient > = new ReactorNettyWebSocketClient(); > > webSocketClient.setMaxFramePayloadLength(shenyuConfig.getWebsocket().getMaxFramePayloadSize() > * 1024 * 1024); > return webSocketClient; > } > > > after reuse HttpClient in HttpClientPluginConfiguration: > > > @Bean > public ReactorNettyWebSocketClient > reactorNettyWebSocketClient(final ShenyuConfig shenyuConfig, > > > > final ObjectProvider<HttpClient> httpClient) { > final ReactorNettyWebSocketClient webSocketClient > = new > ReactorNettyWebSocketClient(httpClient.getIfAvailable(HttpClient::create)); > > webSocketClient.setMaxFramePayloadLength(shenyuConfig.getWebsocket().getMaxFramePayloadSize() > * 1024 * 1024); > return webSocketClient; > } > > > I think reuse could be better, how do you guys feel ? > > > > Looking forward to your reply. > dragon-zhang
