camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r608521 - /activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/RedeliveryPolicy.java
Date Thu, 03 Jan 2008 15:15:36 GMT
Author: jstrachan
Date: Thu Jan  3 07:15:36 2008
New Revision: 608521

URL: http://svn.apache.org/viewvc?rev=608521&view=rev
Log:
allow infinite retry - see thread  http://www.nabble.com/RedeliveryPolicy-semantics-tp14588327s22882p14588327.html

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

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/RedeliveryPolicy.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/RedeliveryPolicy.java?rev=608521&r1=608520&r2=608521&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/RedeliveryPolicy.java
(original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/RedeliveryPolicy.java
Thu Jan  3 07:15:36 2008
@@ -60,6 +60,9 @@
      * redelivered
      */
     public boolean shouldRedeliver(int redeliveryCounter) {
+        if (getMaximumRedeliveries() < 0) {
+            return true;
+        }
         return redeliveryCounter < getMaximumRedeliveries();
     }
 
@@ -173,7 +176,8 @@
     }
 
     /**
-     * Sets the maximum number of times a message exchange will be redelivered
+     * Sets the maximum number of times a message exchange will be redelivered.
+     * Setting a negative value will retry forever.
      */
     public void setMaximumRedeliveries(int maximumRedeliveries) {
         this.maximumRedeliveries = maximumRedeliveries;



Mime
View raw message