You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since Stomp over Websocket has not been specified yet, and since both Stomp.js (the most widely used implementation on client side) and Dart STOMP library have this behavior, it is something the Spring Framework should be able to handle.
Spring 4.0.2 implementation currently assume that 1 Websocket message = 1 STOMP frame, so when a STOMP frame bigger than 16 KBytes (not that unusual) is sent by the client over multiple WebSocket messages, Spring throw the following exception : "IllegalStateException: Not a valid STOMP frame: SEND". In order to fix that, we should support STOMP frame split into multiple Websocket messages, by accumulating data received threw a WebSocketSession until the end of the STOMP frame has been reached.
A configuration option with a reasonable default may allow to configure maximum STOMP frame size.
As discussed with Rossen Stoyanchev, since this issue can occur often as soon as you use Spring STOMP support, I tentatively target 4.0.3 release for the moment, but we could postpone it to 4.1 if needed depend on the fix.
I will put feedbacks as soon as the fix will be implemented.
Sébastien Deleuze opened SPR-11527 and commented
Current Stomp.js and Dart STOMP library behavior is to split data bigger than 16 KBytes (see related Stomp.js source code) into multiple Websocket messages. This STOMP frame fragmentation mechanism has been implemented in order to support transmitting bigger messages than the maximum Websocket message size configured on servers.
Since Stomp over Websocket has not been specified yet, and since both Stomp.js (the most widely used implementation on client side) and Dart STOMP library have this behavior, it is something the Spring Framework should be able to handle.
Spring 4.0.2 implementation currently assume that 1 Websocket message = 1 STOMP frame, so when a STOMP frame bigger than 16 KBytes (not that unusual) is sent by the client over multiple WebSocket messages, Spring throw the following exception : "IllegalStateException: Not a valid STOMP frame: SEND". In order to fix that, we should support STOMP frame split into multiple Websocket messages, by accumulating data received threw a WebSocketSession until the end of the STOMP frame has been reached.
A configuration option with a reasonable default may allow to configure maximum STOMP frame size.
As discussed with Rossen Stoyanchev, since this issue can occur often as soon as you use Spring STOMP support, I tentatively target 4.0.3 release for the moment, but we could postpone it to 4.1 if needed depend on the fix.
I will put feedbacks as soon as the fix will be implemented.
Affects: 4.0.2
Issue Links:
The text was updated successfully, but these errors were encountered: