tabish121 commented on code in PR #5216:
URL: https://github.com/apache/activemq-artemis/pull/5216#discussion_r1745824276


##########
artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPStandardMessage.java:
##########
@@ -235,10 +239,87 @@ public void reloadPersistence(ActiveMQBuffer record, 
CoreMessageObjectPools pool
 
       // Message state is now that the underlying buffer is loaded, but the 
contents not yet scanned
       resetMessageData();
+      recoverHeaderDataFromEncoding();
+
       modified = false;
       messageDataScanned = MessageDataScanningStatus.RELOAD_PERSISTENCE.code;
    }
 
+   private void recoverHeaderDataFromEncoding() {
+      final DecoderImpl decoder = TLSEncode.getDecoder();
+      decoder.setBuffer(data);

Review Comment:
   The recover from persistence isn't reloading Header, or anything else for 
that matter before adding it to the Queue as the supplied test shows.  Messages 
read after restart all get added as if priority was set to default as I state 
in the issue if you happen to have read it.  
   
   Instead of adding a new persister to store priority as expiration is 
currently stored, I am quickly scanning the header portion on reload to 
reacquire the priority value in order to keep backwards compatibility.  The 
implementation runs without creating an GC overhead when scanning for the 
Header section.  



-- 
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


Reply via email to