ARTEMIS-5483: New option - jmsMaxTextMessageSize#5689
Open
AlexejTimonin wants to merge 1 commit intoapache:mainfrom
Open
ARTEMIS-5483: New option - jmsMaxTextMessageSize#5689AlexejTimonin wants to merge 1 commit intoapache:mainfrom
AlexejTimonin wants to merge 1 commit intoapache:mainfrom
Conversation
Adds a new configuration option for Jakarta client consumers. When this configuration is set, the consumer will throw a javax.jms.JMSException on receiving large text(type 3) message that would exceed the specified size (in bytes) when creating javax.jms.TextMessage jmsMaxTextMessageSize is intended to prevent consumers of javax.jms.TextMessage from crashing due to out-of-memory when receiving messages that are larger than consumers memory. The configuration is provided as a URL property when establishing a connection to the broker. Example: Throw on large text messages exceeding 10MB in size: tcp://localhost:61616?jmsMaxTextMessageSize=10000000 Note: This option relies on how core client consumer works. When message is above certain size threshold (default 100KB) it will be considered as a large message and be delivered in parts with headers first. With the help of headers we're able to determine the size of the incoming body and reject if it is above jmsMaxTextMessageSize. If the message is below large message threshold then this option has no real defensive effect since the message will be read into memory anyway.
26212a6 to
c792765
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a new configuration option for Jakarta client consumers. When this configuration is set, the consumer will throw a
javax.jms.JMSExceptionon receiving large text(type 3) message that would exceed the specified size (in bytes) when creatingjavax.jms.TextMessagejmsMaxTextMessageSizeis intended to prevent consumers ofjavax.jms.TextMessagefrom crashing due to out-of-memory when receiving messages that are larger than consumers memory.The configuration is provided as a URL property when establishing a connection to the broker.
Example:
Throw on large text messages exceeding 10MB in size:
tcp://localhost:61616?jmsMaxTextMessageSize=10000000Note:
This option relies on how core client consumer works. When message is above certain size threshold (default 100KB) it will be considered as a large message and be delivered in parts with headers first. With the help of headers we're able to determine the size of the incoming body and reject if it is above
jmsMaxTextMessageSize.If the message is below large message threshold then this option has no real defensive effect since the message will be read into memory anyway.