This is an automated email from the ASF dual-hosted git repository.

jbonofre pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq-website.git


The following commit(s) were added to refs/heads/main by this push:
     new 85ec8d58a [AMQ-8611] Describe message size limit over REST
     new 5049d29e2 Merge pull request #112 from 
essobedo/AMQ-8611/describe-message-size-limit-over-rest
85ec8d58a is described below

commit 85ec8d58a9684481fc4bd403bc2b5c8ada75b8dc
Author: Nicolas Filotto <[email protected]>
AuthorDate: Tue Sep 5 11:56:12 2023 +0200

    [AMQ-8611] Describe message size limit over REST
---
 src/rest.md | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/src/rest.md b/src/rest.md
index 30b3964cf..ae6f968a2 100644
--- a/src/rest.md
+++ b/src/rest.md
@@ -75,6 +75,25 @@ curl -XPOST -d "body=message" 
http://admin:admin@localhost:8161/api/message?dest
 curl -XPOST -d "body=message" 
http://admin:admin@localhost:8161/api/message?destination=topic://orders.input
 ```
 
+#### Message size limit
+
+By default, the size of the message is limited to `100,000` characters to 
prevent running potentially out of memory. This value can be modified by 
setting the init parameter `maxMessageSize` to the value of your choice. 
Setting the value to `-1` disables the limitation.  
+
+To change the value, modify the file `webapps/api/WEB-INF/web.xml` as shown 
below:
+```
+<servlet>
+    <servlet-name>MessageServlet</servlet-name>
+    <servlet-class>org.apache.activemq.web.MessageServlet</servlet-class>
+    <load-on-startup>1</load-on-startup>
+    <async-supported>true</async-supported>
+
+    <init-param>
+        <param-name>maxMessageSize</param-name>
+        <param-value>-1</param-value>
+    </init-param>
+</servlet>
+```
+
 ### Timeouts
 
 When reading from a queue we might not have any messages. We can use a timeout 
query parameter to indicate how long we are prepared to wait for a message to 
arrive. This allows us to poll or block until a message arrives.

Reply via email to