Description
Within Spring Integration's WebSocket support, 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.
ConcurrentWebSocketSessionDecorator
provides the ability to configure three things:
sendTimeLimit
bufferSizeLimit
overflowStrategy
since spring-projects/spring-framework@309ffc6
The first two are also configurable in IntegrationWebSocketContainer
. However, overflowStrategy
is missing.
Suggestion
I'd like to be able to configure overflowStrategy
in IntegrationWebSocketContainer
, just like the other two options.
This should be possible via a simple setter, analogous to setSendTimeLimit
and setSendBufferSizeLimit
.
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.