camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject camel git commit: Fixed an issue spotted from https://github.com/apache/camel/commit/464c06eac4ab7155e016ab72541525d0d2a2e77e#commitcomment-9989261
Date Mon, 02 Mar 2015 17:51:33 GMT
Repository: camel
Updated Branches:
  refs/heads/master d33af55d6 -> 73b69af70


Fixed an issue spotted from https://github.com/apache/camel/commit/464c06eac4ab7155e016ab72541525d0d2a2e77e#commitcomment-9989261


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

Branch: refs/heads/master
Commit: 73b69af702ace1ed4dbb52b58260c073d3ddcd66
Parents: d33af55
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Mon Mar 2 18:52:46 2015 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Mon Mar 2 18:52:46 2015 +0100

----------------------------------------------------------------------
 .../camel/component/rabbitmq/RabbitMQConsumer.java   | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/73b69af7/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 73aa814..a4a6362 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
@@ -184,13 +184,6 @@ public class RabbitMQConsumer extends DefaultConsumer {
             Exchange exchange = consumer.endpoint.createRabbitExchange(envelope, properties,
body);
             mergeAmqpProperties(exchange, properties);
 
-            Message msg;
-            if (exchange.hasOut()) {
-                msg = exchange.getOut();
-            } else {
-                msg = exchange.getIn();
-            }
-
             boolean sendReply = properties.getReplyTo() != null;
             if (sendReply && !exchange.getPattern().isOutCapable()) {
                 exchange.setPattern(ExchangePattern.InOut);
@@ -204,6 +197,14 @@ public class RabbitMQConsumer extends DefaultConsumer {
                 exchange.setException(e);
             }
 
+            // obtain the message after processing
+            Message msg;
+            if (exchange.hasOut()) {
+                msg = exchange.getOut();
+            } else {
+                msg = exchange.getIn();
+            }
+
             if (!exchange.isFailed()) {
                 // processing success
                 if (sendReply && exchange.getPattern().isOutCapable()) {


Mime
View raw message