-
Notifications
You must be signed in to change notification settings - Fork 1.1k
IntegrationWebSocketContainer: Make Buffer Overflow Strategy Configurable #8678
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
Comments
… IntegrationWebSocketContainer
Within Spring Integration's WebSocket support, a `ConcurrentWebSocketSessionDecorator`, which buffers outbound messages if sending is slow, is used to decorate all websocket sessions in `IntegrationWebSocketContainer`, the standard entrypoint for using websockets with Integration. * Expose a `ConcurrentWebSocketSessionDecorator.OverflowStrategy` option on the `IntegrationWebSocketContainer` **Cherry-pick to `5.5.x`, `6.0.x` & `6.1.x`**
Within Spring Integration's WebSocket support, a `ConcurrentWebSocketSessionDecorator`, which buffers outbound messages if sending is slow, is used to decorate all websocket sessions in `IntegrationWebSocketContainer`, the standard entrypoint for using websockets with Integration. * Expose a `ConcurrentWebSocketSessionDecorator.OverflowStrategy` option on the `IntegrationWebSocketContainer` **Cherry-pick to `5.5.x`, `6.0.x` & `6.1.x`** (cherry picked from commit be53593)
Within Spring Integration's WebSocket support, a `ConcurrentWebSocketSessionDecorator`, which buffers outbound messages if sending is slow, is used to decorate all websocket sessions in `IntegrationWebSocketContainer`, the standard entrypoint for using websockets with Integration. * Expose a `ConcurrentWebSocketSessionDecorator.OverflowStrategy` option on the `IntegrationWebSocketContainer` **Cherry-pick to `5.5.x`, `6.0.x` & `6.1.x`** (cherry picked from commit be53593)
Within Spring Integration's WebSocket support, a `ConcurrentWebSocketSessionDecorator`, which buffers outbound messages if sending is slow, is used to decorate all websocket sessions in `IntegrationWebSocketContainer`, the standard entrypoint for using websockets with Integration. * Expose a `ConcurrentWebSocketSessionDecorator.OverflowStrategy` option on the `IntegrationWebSocketContainer` **Cherry-pick to `5.5.x`, `6.0.x` & `6.1.x`** (cherry picked from commit be53593) # Conflicts: # spring-integration-websocket/src/test/java/org/springframework/integration/websocket/ClientWebSocketContainerTests.java
Merged as be53593 and cherry-picked to While reviewing this I've noticed that we have an XML configuration support for WebSocket containers. Thank you for contribution; looking forward for more! |
Thanks for all the help, that was a really smooth process. I'll look into that XML support. |
Within Spring Integration's WebSocket support,
ConcurrentWebSocketSessionDecorator
, which buffers outbound messages if sending is slow, is used to decorate all websocket sessions inIntegrationWebSocketContainer
, the standard entrypoint for using websockets with Integration.ConcurrentWebSocketSessionDecorator
provides the ability to configure three things:sendTimeLimit
bufferSizeLimit
overflowStrategy
since spring-projects/spring-framework@309ffc6The first two are also configurable in
IntegrationWebSocketContainer
. However,overflowStrategy
is missing.Suggestion
I'd like to be able to configure
overflowStrategy
inIntegrationWebSocketContainer
, just like the other two options.This should be possible via a simple setter, analogous to
setSendTimeLimit
andsetSendBufferSizeLimit
.Context
My project's requirements allow me to drop messages if the server can't keep up (UDP-esque).
Currently, when messages aren't being flushed out fast enough,
ConcurrentWebSocketSessionDecorator
hits its buffer size limit and closes the websocket session.I wish to use
OverflowStrategy.DROP
to circumvent this.A workaround is increasing the buffer size limit, though this is obviously not sustainable.
The text was updated successfully, but these errors were encountered: