tabish121 commented on a change in pull request #3036: ARTEMIS-2669 Improve 
AMQPStandardMessage::reencode on depaging not durable messages
URL: https://github.com/apache/activemq-artemis/pull/3036#discussion_r395680849
 
 

 ##########
 File path: 
artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPMessage.java
 ##########
 @@ -837,16 +837,26 @@ protected synchronized void 
lazyScanAfterReloadPersistence() {
       messageDataScanned = MessageDataScanningStatus.SCANNED.code;
       modified = false;
 
+      makeDurable();
+   }
+
+   private void makeDurable() {
+      assert messageDataScanned == MessageDataScanningStatus.SCANNED.code;
       // Message state should reflect that is came from persistent storage 
which
       // can happen when moved to a durable location.  We must re-encode here 
to
       // avoid a subsequent redelivery from suddenly appearing with a durable 
header
       // tag when the initial delivery did not.
       if (!isDurable()) {
 
 Review comment:
   Removing would be a good option as the broker is currently altering the 
Delivery in a way that changes what the sender originally intended for it.  Any 
forwarding or resending from other intermediaries will see behavioural changes 
down the line because the Delivery shifted from non-durable to durable without 
(as far as I can tell) a valid reason for it doing so.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to