AlexejTimonin opened a new pull request, #5689: URL: https://github.com/apache/activemq-artemis/pull/5689
Adds a new configuration option for Jakarta client consumers. When this configuration is set, the consumer will throw a ``javax.jms.JMSException`` 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. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: gitbox-unsubscr...@activemq.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@activemq.apache.org For additional commands, e-mail: gitbox-h...@activemq.apache.org For further information, visit: https://activemq.apache.org/contact