Java SockJS Spring client and message size

后端 未结 2 1122
名媛妹妹
名媛妹妹 2020-12-29 14:43

Using SockJS java client, I am trying to connect to Spring sockjs server and is getting error 1009 for messages (without headers) of ~20Kb. Javascript library works fine.

2条回答
  •  生来不讨喜
    2020-12-29 15:20

    If you're doing it like this:

    SockJsClient sockJsClient = new SockJsClient(transports);
        WebSocketStompClient stompClient = new WebSocketStompClient(sockJsClient);
    

    Try:

    stompClient.setInboundMessageSizeLimit(your_message_size_limit);
    

提交回复
热议问题