jakartaee / jakartaee/websocket
MaxMessageSize and Buffer Size Clarification
- Dominant language
- Java
- Stars
- 78
- Forks
- 47
- Avg merge
- 1h 32m
- Merged PRs (30d)
- 1
Description
The [maxMessageSize](https://jakarta.ee/specifications/websocket/2.2/apidocs/server/jakarta/websocket/onmessage#maxMessageSize()) annotation defines a default value of -1, indicating that no maximum message size is enforced.
In practice, however, servers impose effective limits through buffer sizes, which are set via [WebSocket Session](https://jakarta.ee/specifications/websocket/2.2/apidocs/server/jakarta/websocket/session) methods such as getMaxBinaryMessageBufferSize / setMaxBinaryMessageBufferSize and getMaxTextMessageBufferSize / setMaxTextMessageBufferSize.
The specification does not define standard defaults for buffer sizes, nor does it clarify how these limits should interact with maxMessageSize (e.g., when one exceeds the other). For example, it is unclear whether buffer sizes should be increased to match the value of maxMessageSize, or how inconsistencies between these settings should be handled.
Thanks!
Contributor guide
Research direction
Start by reviewing the maxMessageSize annotation and the WebSocket Session methods getMaxBinaryMessageBufferSize, setMaxBinaryMessageBufferSize, getMaxTextMessageBufferSize, and setMaxTextMessageBufferSize. Compare their documented defaults and interactions, then determine what specification clarification is needed. Done means the defaults and behavior when the limits differ are clearly defined.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, documentation
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100