camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acosent...@apache.org
Subject camel git commit: CAMEL-9505: RabbitMQConsumer don't use Camel ExceptionHandler BEFORE requeing message
Date Wed, 13 Jan 2016 14:23:47 GMT
Repository: camel
Updated Branches:
  refs/heads/master 0832667f2 -> 1c6cfe0ea


CAMEL-9505: RabbitMQConsumer don't use Camel ExceptionHandler BEFORE requeing message


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/1c6cfe0e
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/1c6cfe0e
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/1c6cfe0e

Branch: refs/heads/master
Commit: 1c6cfe0ea1677dcb0b2a4244c2815bd06cdd51d0
Parents: 0832667
Author: Andrea Cosentino <ancosen@gmail.com>
Authored: Wed Jan 13 15:19:57 2016 +0100
Committer: Andrea Cosentino <ancosen@gmail.com>
Committed: Wed Jan 13 15:19:57 2016 +0100

----------------------------------------------------------------------
 .../apache/camel/component/rabbitmq/RabbitMQConsumer.java   | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/1c6cfe0e/components/camel-rabbitmq/src/main/java/org/apache/camel/component/rabbitmq/RabbitMQConsumer.java
----------------------------------------------------------------------
diff --git a/components/camel-rabbitmq/src/main/java/org/apache/camel/component/rabbitmq/RabbitMQConsumer.java
b/components/camel-rabbitmq/src/main/java/org/apache/camel/component/rabbitmq/RabbitMQConsumer.java
index c3569e7..280ed2a 100644
--- a/components/camel-rabbitmq/src/main/java/org/apache/camel/component/rabbitmq/RabbitMQConsumer.java
+++ b/components/camel-rabbitmq/src/main/java/org/apache/camel/component/rabbitmq/RabbitMQConsumer.java
@@ -223,7 +223,11 @@ public class RabbitMQConsumer extends DefaultConsumer {
             } else {
                 msg = exchange.getIn();
             }
-
+            
+            if (exchange.getException() != null) {
+                getExceptionHandler().handleException("Error processing exchange", exchange,
exchange.getException());
+            }
+            
             if (!exchange.isFailed()) {
                 // processing success
                 if (sendReply && exchange.getPattern().isOutCapable()) {
@@ -253,9 +257,6 @@ public class RabbitMQConsumer extends DefaultConsumer {
                     channel.basicAck(deliveryTag, false);
                 }
             } else {
-                if (exchange.getException() != null) {
-                    getExceptionHandler().handleException("Error processing exchange", exchange,
exchange.getException());
-                }
                 boolean isRequeueHeaderSet = msg.getHeader(RabbitMQConstants.REQUEUE, false,
boolean.class);
                 // processing failed, then reject and handle the exception
                 if (deliveryTag != 0 && !consumer.endpoint.isAutoAck()) {


Mime
View raw message