Repository: usergrid Updated Branches: refs/heads/master e0d6481ff -> 20c17d4ff
Simplify the SQS long polling to be 1 second less than the queue client (SQS client) socket timeout. Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/d050300d Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/d050300d Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/d050300d Branch: refs/heads/master Commit: d050300d5aef97f333d8af624957efe3f5126328 Parents: 3b03a3c Author: Michael Russo <[email protected]> Authored: Sun Feb 28 22:50:07 2016 -0800 Committer: Michael Russo <[email protected]> Committed: Sun Feb 28 22:50:07 2016 -0800 ---------------------------------------------------------------------- .../corepersistence/asyncevents/AsyncEventServiceImpl.java | 2 +- .../usergrid/corepersistence/index/IndexProcessorFig.java | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/usergrid/blob/d050300d/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventServiceImpl.java ---------------------------------------------------------------------- diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventServiceImpl.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventServiceImpl.java index b1d0805..d3b87ad 100644 --- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventServiceImpl.java +++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventServiceImpl.java @@ -244,7 +244,7 @@ public class AsyncEventServiceImpl implements AsyncEventService { try { return queue.getMessages(MAX_TAKE, indexProcessorFig.getIndexQueueVisibilityTimeout(), - indexProcessorFig.getIndexQueueTimeout(), + queueFig.getQueueClientSocketTimeout() - 1000, // 1 second less than socket timeout AsyncEvent.class); } //stop our timer http://git-wip-us.apache.org/repos/asf/usergrid/blob/d050300d/stack/core/src/main/java/org/apache/usergrid/corepersistence/index/IndexProcessorFig.java ---------------------------------------------------------------------- diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/index/IndexProcessorFig.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/index/IndexProcessorFig.java index e46406d..15f9f9d 100644 --- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/index/IndexProcessorFig.java +++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/index/IndexProcessorFig.java @@ -40,8 +40,6 @@ public interface IndexProcessorFig extends GuicyFig { String ELASTICSEARCH_QUEUE_IMPL = "elasticsearch.queue_impl"; - String INDEX_QUEUE_READ_TIMEOUT = "elasticsearch.queue_read_timeout"; - String INDEX_QUEUE_VISIBILITY_TIMEOUT = "elasticsearch.queue_visibility_timeout"; String REINDEX_BUFFER_SIZE = "elasticsearch.reindex.buffer_size"; @@ -55,12 +53,6 @@ public interface IndexProcessorFig extends GuicyFig { @Key(FAILURE_REJECTED_RETRY_WAIT_TIME) long getFailureRetryTime(); - /** - * Set the read timeout for processing messages in the queue. (in milliseconds) - */ - @Default("10000") - @Key(INDEX_QUEUE_READ_TIMEOUT) - int getIndexQueueTimeout(); /** * Set the visibility timeout for messages received from the queue. (in milliseconds).
