Skip to content

Support receiving fragmented STOMP frames [SPR-11527] #16152

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
spring-projects-issues opened this issue Mar 7, 2014 · 0 comments
Closed

Support receiving fragmented STOMP frames [SPR-11527] #16152

spring-projects-issues opened this issue Mar 7, 2014 · 0 comments
Assignees
Labels
in: messaging Issues in messaging modules (jms, messaging) type: enhancement A general enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented Mar 7, 2014

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:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: messaging Issues in messaging modules (jms, messaging) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants