Search code examples
springwebsocketsockjsspring-websocket

Setting message size for spring sockjs websocket server


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?


Solution

  • 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.