WebSocketDeploymentInfo, the default worker will be used

Viewed 3164

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?

3 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);
        });
    }
}

exclusion undertow-websockets undertow-websockets-jsrio.undertow

If not using WebSocket in Undertow on SpringBoot.

implementation ("org.springframework.boot:spring-boot-starter-undertow") {
    exclude group: "io.undertow", module: "undertow-websockets-jsr"
}
Related