Skip to content

Improve STOMP WebSocket documentation for input message buffer size #31616

@monkeycode0

Description

@monkeycode0

I send a message to the server from a web UI.

When the data size is greater than 64K, the server does not respond to the WEB client.

How can I change the max buffer size?

@Configuration
@EnableWebSocketMessageBroker
public class WebSocketConfig implements WebSocketMessageBrokerConfigurer {
    @Bean
    public ServletServerContainerFactoryBean createWebSocketContainer() {
        ServletServerContainerFactoryBean factoryBean = new ServletServerContainerFactoryBean();
        factoryBean.setMaxBinaryMessageBufferSize(2*1024*1024);
        factoryBean.setMaxTextMessageBufferSize(2*1024*1024);
        factoryBean.setMaxSessionIdleTimeout(60 * 1000L);
        return factoryBean;
    }
}

I'd like to use this config, but it does not work.

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)status: backportedAn issue that has been backported to maintenance branchestype: documentationA documentation task

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions