You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@activemq.apache.org by GitBox <gi...@apache.org> on 2019/08/13 17:42:12 UTC

[GitHub] [activemq-artemis] jbertram commented on a change in pull request #2691: ARTEMIS-2364 collision avoidance for redelivery

jbertram commented on a change in pull request #2691: ARTEMIS-2364 collision avoidance for redelivery
URL: https://github.com/apache/activemq-artemis/pull/2691#discussion_r313526420
 
 

 ##########
 File path: artemis-server/src/main/java/org/apache/activemq/artemis/core/deployers/impl/FileConfigurationParser.java
 ##########
 @@ -1037,6 +1039,11 @@ public SecuritySettingPlugin run() {
             addressSettings.setRedeliveryDelay(XMLUtil.parseLong(child));
          } else if (REDELIVERY_DELAY_MULTIPLIER_NODE_NAME.equalsIgnoreCase(name)) {
             addressSettings.setRedeliveryMultiplier(XMLUtil.parseDouble(child));
+         } else if (REDELIVERY_COLLISION_AVOIDANCE_FACTOR_NODE_NAME.equalsIgnoreCase(name)) {
+            double redeliveryCollisionAvoidanceFactor = XMLUtil.parseDouble(child);
+            Validators.GE_ZERO.validate(REDELIVERY_COLLISION_AVOIDANCE_FACTOR_NODE_NAME, redeliveryCollisionAvoidanceFactor);
+            Validators.LE_ONE.validate(REDELIVERY_COLLISION_AVOIDANCE_FACTOR_NODE_NAME, redeliveryCollisionAvoidanceFactor);
+            addressSettings.setRedeliveryCollisionAvoidanceFactor(redeliveryCollisionAvoidanceFactor);
 
 Review comment:
   For continuity with 5.x I think the configuration should use `redelivery-collision-avoidance-factor` since 5.x uses `collisionAvoidanceFactor`. That said, this is really just a matter of opinion and not strict correctness. It could be implemented any number of ways.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services