cshannon commented on code in PR #2755:
URL: https://github.com/apache/activemq/pull/2755#discussion_r4482177045


##########
activemq-broker/src/main/java/org/apache/activemq/broker/region/Queue.java:
##########
@@ -129,6 +129,7 @@ public class Queue extends BaseDestination implements Task, 
UsageListener, Index
     private MessageGroupMap messageGroupOwners;
     private DispatchPolicy dispatchPolicy = new RoundRobinDispatchPolicy();
     private MessageGroupMapFactory messageGroupMapFactory = new 
CachedMessageGroupMapFactory();
+    private volatile boolean useMessageGroups = true;

Review Comment:
   This may not matter but my primary concern is we have to do a volatile read 
now on a hot path, for every message dispatch, including possible multiple 
times in a loop.At the very least the variable could be read once per dispatch 
into a local variable I think.



-- 
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]
For further information, visit: https://activemq.apache.org/contact


Reply via email to