gemmellr commented on code in PR #6323:
URL: https://github.com/apache/artemis/pull/6323#discussion_r3080294163


##########
artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPMessage.java:
##########
@@ -1220,13 +1233,18 @@ public final Object getDuplicateProperty() {
 
    @Override
    public boolean isDurable() {
-      if (header != null && header .getDurable() != null) {
-         return header.getDurable();
-      } else {
-         // if header == null and scanningStatus=RELOAD_PERSISTENCE, it means 
the message can only be durable
-         // even though the parsing hasn't happened yet
-         return getDataScanningStatus() == 
MessageDataScanningStatus.RELOAD_PERSISTENCE;
+      if (this.durable == VALUE_NOT_PRESENT) {
+         if (header != null && header.getDurable() != null) {
+            this.durable = header.getDurable() ? (byte)1 : (byte)0;

Review Comment:
   The side effects seem ugly and brittle, but _reloadSetDurable_ does this 
same thing, and _setDurable_ calls that method below, so its unclear this 
shouldnt also call it..



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

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to