Got it resolved, the way spring document has mentioned, did not worked for me -tomcat would not pick the parameters from there. Finally getting hold of ServletServerContainerFactoryBean (which is always singleton) and setting the properties there worked for me. Details: How to increase output buffer for spring sockjs websocket server implementation.
Setting message size for spring sockjs websocket server
-
10-10-2022 - |
سؤال
I have used spring sockjs server implementation for websockets. It supports messages upto 2kb but above that the websocket connection breaks -gives an 1006 error. If I reduce the message size, then it runs ok. I went through the docs as well as classes, but could get a place where I can increase this limit. Have asked in spring forum as well but no reply. Any Idea?
المحلول 2
نصائح أخرى
Any stack traces in the server logs? What server? And what transport is being used (websocket, xhr-streaming, other?) For the WebSocket transport you may be hitting default limits on the message buffer. Have you seen the section on Configuring the WebSocket Engine in the documentation?
لا تنتمي إلى StackOverflow