qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rob...@apache.org
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 GMT
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


Mime
View raw message