Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WebSocketDeploymentInfo, the default worker will be used

In my SpringBoot application logs I see the following WARNs:

UT026009: XNIO worker was not set on WebSocketDeploymentInfo, the default worker will be used
UT026010: Buffer pool was not set on WebSocketDeploymentInfo, the default pool will be used

From a Google search it seems they could be related to Undertow suggesting for an improvement which seems to be impossible to be implemented.

Does anyone have any further clarifications on these, and maybe a suggestion on how to make the logs disappear since the application runs just fine?

like image 964
FleaLes Avatar asked Jun 12 '26 00:06

FleaLes


1 Answers

It is a heads up for configuration of buff pool and does not effect in using.

As suggested from https://blog.csdn.net/weixin_39841589/article/details/90582354,

@Component
public class CustomizationBean implements WebServerFactoryCustomizer<UndertowServletWebServerFactory> {
 
    @Override
    public void customize(UndertowServletWebServerFactory factory) {
        factory.addDeploymentInfoCustomizers(deploymentInfo -> {
            WebSocketDeploymentInfo webSocketDeploymentInfo = new WebSocketDeploymentInfo();
            webSocketDeploymentInfo.setBuffers(new DefaultByteBufferPool(false, 1024));
            deploymentInfo.addServletContextAttribute("io.undertow.websockets.jsr.WebSocketDeploymentInfo", webSocketDeploymentInfo);
        });
    }
}
like image 166
Sean Sun Avatar answered Jun 15 '26 05:06

Sean Sun



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!