You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@activemq.apache.org by GitBox <gi...@apache.org> on 2019/06/08 12:08:17 UTC

[GitHub] [activemq-artemis] franz1981 commented on a change in pull request #2694: ARTEMIS-2371 Message with huge header shuts broker down

franz1981 commented on a change in pull request #2694: ARTEMIS-2371 Message with huge header shuts broker down
URL: https://github.com/apache/activemq-artemis/pull/2694#discussion_r291804777
 
 

 ##########
 File path: artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/JournalStorageManager.java
 ##########
 @@ -548,6 +549,17 @@ public LargeServerMessage createLargeMessage(final long id, final Message messag
 
          largeMessage.setMessageID(id);
 
+
+         // Check durable large massage size before to allocate resources if it can't be stored
+         if (largeMessage.isDurable()) {
+            final long maxRecordSize = getMaxRecordSize();
+            final int messageEncodeSize = largeMessage.getEncodeSize();
 
 Review comment:
   You need to check the header and properties encoded size (that doesn't cost anything): this check will check size including header + trailer + body altogether.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services