Closed as not planned
Closed as not planned
Description
We have a Spring backend Application with Angular Frontend.
When sending msgs from backend to frontend, some large msgs (size ard 80 - 125KB) are not being delivered. When i cut down the incoming object and make it smaller (mostly <64KB) it gets delivered.
@stomp/rx-stomp library is being used to send websocket msgs to backend. Here are some relevant configurations
export const myRxStompConfig: RxStompConfig = {
webSocketFactory: () => {
return new SockJS('/api/process/websocket');
},
logRawCommunication: false,
splitLargeFrames: true,
maxWebSocketChunkSize: 8 * 1024,
}
Here are some relevant configurations on backend side
public class WebSocketConfig implements WebSocketMessageBrokerConfigurer {
@Override
public void configureWebSocketTransport(WebSocketTransportRegistration registry){
registry.setMessageSizeLimit(8192 * 1024); // default : 64 * 1024
registry.setSendTimeLimit(20 * 10000); // default : 10 * 10000
registry.setSendBufferSizeLimit(10 * 512 * 1024); // default : 512 * 1024
}
@Override
public void registerStompEndpoints(StompEndpointRegistry registry) {
registry.addEndpoint("/websocket").setAllowedOriginPatterns("*").withSockJS()
.setStreamBytesLimit(1024*1024);
}
}