svn commit: r613770 - /activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/DeadLetterChannel.java

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r613770 - /activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/DeadLetterChannel.java

ningjiang
Author: ningjiang
Date: Sun Jan 20 22:09:23 2008
New Revision: 613770

URL: http://svn.apache.org/viewvc?rev=613770&view=rev
Log:
CAMEL-283 applied the patch with thanks to Claus

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

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/DeadLetterChannel.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/DeadLetterChannel.java?rev=613770&r1=613769&r2=613770&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/DeadLetterChannel.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/DeadLetterChannel.java Sun Jan 20 22:09:23 2008
@@ -104,7 +104,7 @@
                 Throwable e = exchange.getException();
                 exchange.setException(null); // Reset it since we are handling it.
                 
-                logger.log("On delivery attempt: " + data.redeliveryCounter + " caught: " + e, e);
+                logger.log("Failed delivery for exchangeId: " + exchange.getExchangeId() + ". On delivery attempt: " + data.redeliveryCounter + " caught: " + e, e);
                 data.redeliveryCounter = incrementRedeliveryCounter(exchange, e);
 
                 ExceptionType exceptionPolicy = getExceptionPolicy(exchange, e);
@@ -127,8 +127,8 @@
                     }
                 });
                 
-                restoreExceptionOnExchange(exchange);
-                
+                restoreExceptionOnExchange(exchange);              
+                logger.log("Failed delivery for exchangeId: " + exchange.getExchangeId() + ". Handled by the failure processor: " + data.failureProcessor);
                 return sync;
             }
 
@@ -255,7 +255,7 @@
     protected void sleep(long redeliveryDelay) {
         if (redeliveryDelay > 0) {
             if (LOG.isDebugEnabled()) {
-                LOG.debug("Sleeping for: " + redeliveryDelay + " until attempting redelivery");
+                LOG.debug("Sleeping for: " + redeliveryDelay + " millis until attempting redelivery");
             }
             try {
                 Thread.sleep(redeliveryDelay);