activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r812932 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/RedeliveryPolicy.java
Date Wed, 09 Sep 2009 13:03:03 GMT
Author: rajdavies
Date: Wed Sep  9 13:03:03 2009
New Revision: 812932

URL: http://svn.apache.org/viewvc?rev=812932&view=rev
Log:
Fix for https://issues.apache.org/activemq/browse/AMQ-910

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/RedeliveryPolicy.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/RedeliveryPolicy.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/RedeliveryPolicy.java?rev=812932&r1=812931&r2=812932&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/RedeliveryPolicy.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/RedeliveryPolicy.java Wed
Sep  9 13:03:03 2009
@@ -37,7 +37,7 @@
     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 short getBackOffMultiplier() {
+    public double getBackOffMultiplier() {
         return backOffMultiplier;
     }
 
-    public void setBackOffMultiplier(short backOffMultiplier) {
+    public void setBackOffMultiplier(double backOffMultiplier) {
         this.backOffMultiplier = backOffMultiplier;
     }
 
@@ -88,7 +88,7 @@
         if (previousDelay == 0) {
             redeliveryDelay = initialRedeliveryDelay;
         } else if (useExponentialBackOff && backOffMultiplier > 1) {
-            redeliveryDelay = previousDelay * backOffMultiplier;
+            redeliveryDelay = (long) (previousDelay * backOffMultiplier);
         } else {
             redeliveryDelay = previousDelay;
         }



Mime
View raw message