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:24:30 GMT
Repository: camel
Updated Branches:
  refs/heads/camel-2.16.x 02fd57d85 -> 0d82e68f6


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/0d82e68f
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/0d82e68f
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/0d82e68f

Branch: refs/heads/camel-2.16.x
Commit: 0d82e68f6d9669b36ab642a5185bf1508f9047c9
Parents: 02fd57d
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:22:01 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/0d82e68f/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 3a5a4ea..a2b4f41 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