michaelpearce-gain commented on a change in pull request #2802: ARTEMIS-2457
implement ring queue
URL: https://github.com/apache/activemq-artemis/pull/2802#discussion_r317417104
##########
File path:
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java
##########
@@ -576,15 +612,17 @@ public QueueImpl(final long id,
if (this.addressInfo != null && this.addressInfo.isPaused()) {
this.pause(false);
}
+
+ this.ringSize = ringSize == null ? (addressSettingsRepository != null ?
addressSettingsRepository.getMatch(address.toString()).getDefaultRingSize() :
-1) : ringSize;
Review comment:
doesnt seem to match the logic of all others, which is that address setting
resolvement if not set is meant to occur well before create queue object (e.g.
ownership of that logic is else where) to keep things standardised where
looking for where things occur, and if null reaches here (not expected, but a
safety is that it defaults to the constant.
Currently if it was null and addresssettingrepo is null, you will get NPE.
which others dont.
e.g.
expecting something more inline with others:
example:
this.maxConsumers = maxConsumers == null ?
ActiveMQDefaultConfiguration.getDefaultMaxQueueConsumers() : maxConsumers;
----------------------------------------------------------------
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