camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [1/2] git commit: CAMEL-6767: rabbitmq component sends basic ack after channel closed when endpoint is set to autoAck. Thanks to Dan Revel for the patch.
Date Tue, 01 Oct 2013 09:50:58 GMT
Updated Branches:
  refs/heads/camel-2.12.x 5f91492e2 -> 7248e67b3
  refs/heads/master f412d7444 -> a2779a0c2


CAMEL-6767: rabbitmq component sends basic ack after channel closed when endpoint is set to
autoAck. Thanks to Dan Revel for the patch.


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

Branch: refs/heads/master
Commit: a2779a0c26c71ee42c7be8c045ae314a3eb81638
Parents: f412d74
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Tue Oct 1 11:47:19 2013 +0200
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Tue Oct 1 11:47:19 2013 +0200

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


http://git-wip-us.apache.org/repos/asf/camel/blob/a2779a0c/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 a1128dd..468e728 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
@@ -122,8 +122,10 @@ public class RabbitMQConsumer extends DefaultConsumer {
                 consumer.getProcessor().process(exchange);
 
                 long deliveryTag = envelope.getDeliveryTag();
-                log.trace("Acknowleding receipt [delivery_tag={}]", deliveryTag);
-                channel.basicAck(deliveryTag, false);
+                if (consumer.endpoint.isAutoAck()) {
+                    log.trace("Acknowledging receipt [delivery_tag={}]", deliveryTag);
+                    channel.basicAck(deliveryTag, false);
+                }
 
             } catch (Exception e) {
                 getExceptionHandler().handleException("Error processing exchange", exchange,
e);


Mime
View raw message