usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From toddn...@apache.org
Subject [2/2] usergrid git commit: Lowers the default viability timeout to 10 seconds
Date Wed, 14 Oct 2015 21:30:39 GMT
Lowers the default viability timeout to 10 seconds

Changes retry count to 20. During this, we should hit the 10% read repair chance if we're
missing data.


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

Branch: refs/heads/2.1-release
Commit: 0f589f688ee72fe9db2b50e7af6604152cd898ff
Parents: dbf37e4
Author: Todd Nine <tnine@apigee.com>
Authored: Wed Oct 14 14:27:42 2015 -0700
Committer: Todd Nine <tnine@apigee.com>
Committed: Wed Oct 14 14:27:42 2015 -0700

----------------------------------------------------------------------
 .../org/apache/usergrid/persistence/queue/QueueFig.java | 12 ++++++++++--
 .../persistence/queue/util/AmazonNotificationUtils.java |  1 +
 2 files changed, 11 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/usergrid/blob/0f589f68/stack/corepersistence/queue/src/main/java/org/apache/usergrid/persistence/queue/QueueFig.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/queue/src/main/java/org/apache/usergrid/persistence/queue/QueueFig.java
b/stack/corepersistence/queue/src/main/java/org/apache/usergrid/persistence/queue/QueueFig.java
index 66f8af4..7f26bcf 100644
--- a/stack/corepersistence/queue/src/main/java/org/apache/usergrid/persistence/queue/QueueFig.java
+++ b/stack/corepersistence/queue/src/main/java/org/apache/usergrid/persistence/queue/QueueFig.java
@@ -56,10 +56,10 @@ public interface QueueFig extends GuicyFig {
     String getDeadletterRetentionPeriod();
 
     /**
-     * The maximum number of messages to deliver to a dead letter queue.
+     * The maximum number of attempts to attempt to deliver before failing into the DLQ
      */
     @Key( "usergrid.queue.deliveryLimit" )
-    @Default("5")
+    @Default("20")
     String getQueueDeliveryLimit();
 
     @Key("usergrid.use.default.queue")
@@ -74,4 +74,12 @@ public interface QueueFig extends GuicyFig {
     @Key("usergrid.queue.publish.queuesize")
     @Default("850000")
     int getAsyncQueueSize();
+
+    /**
+     * Set the visibility timeout for faster retries
+     * @return
+     */
+    @Key( "usergrid.queue.visibilityTimeout" )
+    @Default("10")
+    String getVisibilityTimeout();
 }

http://git-wip-us.apache.org/repos/asf/usergrid/blob/0f589f68/stack/corepersistence/queue/src/main/java/org/apache/usergrid/persistence/queue/util/AmazonNotificationUtils.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/queue/src/main/java/org/apache/usergrid/persistence/queue/util/AmazonNotificationUtils.java
b/stack/corepersistence/queue/src/main/java/org/apache/usergrid/persistence/queue/util/AmazonNotificationUtils.java
index c321715..6105592 100644
--- a/stack/corepersistence/queue/src/main/java/org/apache/usergrid/persistence/queue/util/AmazonNotificationUtils.java
+++ b/stack/corepersistence/queue/src/main/java/org/apache/usergrid/persistence/queue/util/AmazonNotificationUtils.java
@@ -64,6 +64,7 @@ public class AmazonNotificationUtils {
         final Map<String, String> queueAttributes = new HashMap<>( 2 );
         queueAttributes.put( "MessageRetentionPeriod", fig.getRetentionPeriod() );
         queueAttributes.put( "RedrivePolicy", redrivePolicy );
+        queueAttributes.put( "VisibilityTimeout", fig.getVisibilityTimeout()  );
 
         CreateQueueRequest createQueueRequest = new CreateQueueRequest().
                                                                             withQueueName(
queueName )


Mime
View raw message