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/06/01 19:46:22 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_r289616537
##########
File path: artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java
##########
@@ -3458,9 +3460,15 @@ private long calculateRedeliveryDelay(final AddressSettings addressSettings, fin
long redeliveryDelay = addressSettings.getRedeliveryDelay();
long maxRedeliveryDelay = addressSettings.getMaxRedeliveryDelay();
double redeliveryMultiplier = addressSettings.getRedeliveryMultiplier();
+ double collisionAvoidanceFactor = addressSettings.getRedeliveryCollisionAvoidanceFactor();
int tmpDeliveryCount = deliveryCount > 0 ? deliveryCount - 1 : 0;
long delay = (long) (redeliveryDelay * (Math.pow(redeliveryMultiplier, tmpDeliveryCount)));
+ if (collisionAvoidanceFactor > 0) {
+ Random random = RandomUtil.getRandom();
Review comment:
I'm not sure what you mean. It returns a `static final` instance of `java.util.Random`. Is that what you're asking about?
----------------------------------------------------------------
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