Partial messages with SockJS in Spring-Websockets 4.2 -
i using spring-websockets 4.2 sockjs.
since messages received clients can quite large, use partial messages. subclass of textwebsockethandler override supportspartialmessages return true. however, since sockjswebsockethandler created spring not support partial messages, still error code=1009, reason=the decoded text message big output buffer , endpoint not support partial messages
.
as workaround, i've increased buffer size 1 mb described here, since have support quite large number of clients (~2000 @ same time), requires way memory.
is there way use partial messages sockjs?
looking @ you're trying do, buffering 2 gb (assuming 1mb) in ram concurrent messages. need change infrastructure, scale vertically or compress message streams. if compressing messages or scaling vertically out of question, think best approach to:
1) either use internal load balancing sticky sessions split number of concurrent users between different server instances. or...
2) implement proper scale out message queue reactive streaming single server can pull from.
your application architecture doesn't good.
Comments
Post a Comment