From 487f2cca03458e8f03420bdbfb8f182ad6a8bc06 Mon Sep 17 00:00:00 2001 From: Robert Davies Date: Wed, 9 Sep 2009 13:03:03 +0000 Subject: [PATCH] Fix for https://issues.apache.org/activemq/browse/AMQ-910 git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@812932 13f79535-47bb-0310-9956-ffa450edef68 --- .../main/java/org/apache/activemq/RedeliveryPolicy.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/activemq-core/src/main/java/org/apache/activemq/RedeliveryPolicy.java b/activemq-core/src/main/java/org/apache/activemq/RedeliveryPolicy.java index 45768bf6fa..8c2638dfd2 100644 --- a/activemq-core/src/main/java/org/apache/activemq/RedeliveryPolicy.java +++ b/activemq-core/src/main/java/org/apache/activemq/RedeliveryPolicy.java @@ -37,7 +37,7 @@ public class RedeliveryPolicy implements Cloneable, Serializable { private long initialRedeliveryDelay = 1000L; private boolean useCollisionAvoidance; private boolean useExponentialBackOff; - private short backOffMultiplier = 5; + private double backOffMultiplier = 5.0; public RedeliveryPolicy() { } @@ -50,11 +50,11 @@ public class RedeliveryPolicy implements Cloneable, Serializable { } } - public short getBackOffMultiplier() { + public double getBackOffMultiplier() { return backOffMultiplier; } - public void setBackOffMultiplier(short backOffMultiplier) { + public void setBackOffMultiplier(double backOffMultiplier) { this.backOffMultiplier = backOffMultiplier; } @@ -88,7 +88,7 @@ public class RedeliveryPolicy implements Cloneable, Serializable { if (previousDelay == 0) { redeliveryDelay = initialRedeliveryDelay; } else if (useExponentialBackOff && backOffMultiplier > 1) { - redeliveryDelay = previousDelay * backOffMultiplier; + redeliveryDelay = (long) (previousDelay * backOffMultiplier); } else { redeliveryDelay = previousDelay; }