Return-Path: X-Original-To: apmail-camel-commits-archive@www.apache.org Delivered-To: apmail-camel-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 38463CA8C for ; Tue, 1 Oct 2013 09:51:08 +0000 (UTC) Received: (qmail 29670 invoked by uid 500); 1 Oct 2013 09:51:05 -0000 Delivered-To: apmail-camel-commits-archive@camel.apache.org Received: (qmail 29543 invoked by uid 500); 1 Oct 2013 09:50:59 -0000 Mailing-List: contact commits-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list commits@camel.apache.org Received: (qmail 29515 invoked by uid 99); 1 Oct 2013 09:50:58 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Oct 2013 09:50:58 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 441F18AC453; Tue, 1 Oct 2013 09:50:58 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: davsclaus@apache.org To: commits@camel.apache.org Date: Tue, 01 Oct 2013 09:50:59 -0000 Message-Id: <2a622ff1117e4f44b6134eb1a07db8f4@git.apache.org> In-Reply-To: <7309846145754c98933c2e6038892ffd@git.apache.org> References: <7309846145754c98933c2e6038892ffd@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [2/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. 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/7248e67b Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/7248e67b Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/7248e67b Branch: refs/heads/camel-2.12.x Commit: 7248e67b3b6e2ee448bf70a9304f6de9e612bb27 Parents: 5f91492 Author: Claus Ibsen Authored: Tue Oct 1 11:47:19 2013 +0200 Committer: Claus Ibsen Committed: Tue Oct 1 11:47:33 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/7248e67b/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);