Return-Path: Delivered-To: apmail-qpid-commits-archive@www.apache.org Received: (qmail 5385 invoked from network); 20 Dec 2010 14:11:53 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 20 Dec 2010 14:11:53 -0000 Received: (qmail 70511 invoked by uid 500); 20 Dec 2010 14:11:53 -0000 Delivered-To: apmail-qpid-commits-archive@qpid.apache.org Received: (qmail 70456 invoked by uid 500); 20 Dec 2010 14:11:52 -0000 Mailing-List: contact commits-help@qpid.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@qpid.apache.org Delivered-To: mailing list commits@qpid.apache.org Received: (qmail 70449 invoked by uid 99); 20 Dec 2010 14:11:52 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Dec 2010 14:11:52 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Dec 2010 14:11:50 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id D6DAB238899C; Mon, 20 Dec 2010 14:11:28 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1051113 - in /qpid/branches/0.5.x-dev/qpid/java/client/src/main/java/org/apache/qpid/client: BasicMessageConsumer.java configuration/ClientProperties.java Date: Mon, 20 Dec 2010 14:11:28 -0000 To: commits@qpid.apache.org From: robbie@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20101220141128.D6DAB238899C@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: robbie Date: Mon Dec 20 14:11:28 2010 New Revision: 1051113 URL: http://svn.apache.org/viewvc?rev=1051113&view=rev Log: QPID-2971: add system property to allow overriding disabling of MaxDelivery for autodelete queues Modified: qpid/branches/0.5.x-dev/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageConsumer.java qpid/branches/0.5.x-dev/qpid/java/client/src/main/java/org/apache/qpid/client/configuration/ClientProperties.java Modified: qpid/branches/0.5.x-dev/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageConsumer.java URL: http://svn.apache.org/viewvc/qpid/branches/0.5.x-dev/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageConsumer.java?rev=1051113&r1=1051112&r2=1051113&view=diff ============================================================================== --- qpid/branches/0.5.x-dev/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageConsumer.java (original) +++ qpid/branches/0.5.x-dev/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageConsumer.java Mon Dec 20 14:11:28 2010 @@ -115,7 +115,8 @@ public abstract class BasicMessageConsum private int _maxDeliveryAttempts = 0; private boolean _maxRedeliverEnabled = false; - + private boolean _maxDeliveryAutodeleteEnabled = + Boolean.getBoolean(ClientProperties.MAX_DELIVERY_AUTODELETE_PROP_NAME); private final DeliveryCountTracker _tracker; /** @@ -179,7 +180,7 @@ public abstract class BasicMessageConsum int idMapSize = Integer.getInteger(ClientProperties.MAX_DELIVERY_RECORDS_PROP_NAME, Math.max(2 * _prefetchHigh, 20)); Integer maxDeliveries = destination.getMaxDeliveryCount(); _maxDeliveryAttempts = maxDeliveries == null ? connection.getMaxDeliveryCount() : maxDeliveries; - _maxRedeliverEnabled = _maxDeliveryAttempts > 0 && !destination.isAutoDelete(); + _maxRedeliverEnabled = _maxDeliveryAttempts > 0 && (!destination.isAutoDelete() || _maxDeliveryAutodeleteEnabled); _tracker = isMaxDeliveryCountEnforced() ? new DeliveryCountTracker(idMapSize) : null; } Modified: qpid/branches/0.5.x-dev/qpid/java/client/src/main/java/org/apache/qpid/client/configuration/ClientProperties.java URL: http://svn.apache.org/viewvc/qpid/branches/0.5.x-dev/qpid/java/client/src/main/java/org/apache/qpid/client/configuration/ClientProperties.java?rev=1051113&r1=1051112&r2=1051113&view=diff ============================================================================== --- qpid/branches/0.5.x-dev/qpid/java/client/src/main/java/org/apache/qpid/client/configuration/ClientProperties.java (original) +++ qpid/branches/0.5.x-dev/qpid/java/client/src/main/java/org/apache/qpid/client/configuration/ClientProperties.java Mon Dec 20 14:11:28 2010 @@ -82,6 +82,11 @@ public class ClientProperties * per-consumer for use in enforcing maximum delivery count. */ public static final String MAX_DELIVERY_RECORDS_PROP_NAME = "qpid.max.delivery.records"; + + /** + * System property to override whether max delivery count is disabled when using autodelete queues. + */ + public static final String MAX_DELIVERY_AUTODELETE_PROP_NAME = "qpid.max.delivery.autodelete"; /** * ========================================================== --------------------------------------------------------------------- Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:commits-subscribe@qpid.apache.org