dragon-zhang opened a new issue, #3224:
URL: https://github.com/apache/incubator-shenyu/issues/3224
### Question
current `WebSocketPluginConfiguration`:
```java
@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`:
```java
@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 ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]