You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by gr...@apache.org on 2016/05/02 19:55:04 UTC
[33/50] [abbrv] usergrid git commit: Back to Schedulers.io()
Back to Schedulers.io()
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/8b2a4b81
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/8b2a4b81
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/8b2a4b81
Branch: refs/heads/USERGRID-1246-MASTER
Commit: 8b2a4b8135e09cd6a717d1b9d35062b81d81b4af
Parents: d1423d8
Author: Michael Russo <mr...@apigee.com>
Authored: Wed Apr 20 19:42:44 2016 -0700
Committer: George Reyes <gr...@apache.org>
Committed: Mon May 2 10:49:34 2016 -0700
----------------------------------------------------------------------
.../notifications/impl/ApplicationQueueManagerImpl.java | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/8b2a4b81/stack/services/src/main/java/org/apache/usergrid/services/notifications/impl/ApplicationQueueManagerImpl.java
----------------------------------------------------------------------
diff --git a/stack/services/src/main/java/org/apache/usergrid/services/notifications/impl/ApplicationQueueManagerImpl.java b/stack/services/src/main/java/org/apache/usergrid/services/notifications/impl/ApplicationQueueManagerImpl.java
index fa8c8a2..44ccf2b 100644
--- a/stack/services/src/main/java/org/apache/usergrid/services/notifications/impl/ApplicationQueueManagerImpl.java
+++ b/stack/services/src/main/java/org/apache/usergrid/services/notifications/impl/ApplicationQueueManagerImpl.java
@@ -64,7 +64,7 @@ public class ApplicationQueueManagerImpl implements ApplicationQueueManager {
- private final Scheduler scheduler;
+ //private final Scheduler scheduler;
@@ -79,8 +79,10 @@ public class ApplicationQueueManagerImpl implements ApplicationQueueManager {
this.queueName = getQueueNames(properties);
this.queueMeter = metricsFactory.getMeter(ApplicationQueueManagerImpl.class, "notification.queue");
this.sendMeter = metricsFactory.getMeter(NotificationsService.class, "queue.send");
+ this.concurrencyFactor = Integer.valueOf(System.getProperty(PUSH_PROCESSING_CONCURRENCY_PROP, "50"));
+ /**
int maxAsyncThreads;
int workerQueueSize;
@@ -88,7 +90,6 @@ public class ApplicationQueueManagerImpl implements ApplicationQueueManager {
maxAsyncThreads = Integer.valueOf(System.getProperty(PUSH_PROCESSING_MAXTHREADS_PROP, "200"));
workerQueueSize = Integer.valueOf(System.getProperty(PUSH_PROCESSING_QUEUESIZE_PROP, "2000"));
- this.concurrencyFactor = Integer.valueOf(System.getProperty(PUSH_PROCESSING_CONCURRENCY_PROP, "50"));
} catch (Exception e){
@@ -104,7 +105,7 @@ public class ApplicationQueueManagerImpl implements ApplicationQueueManager {
this.scheduler = Schedulers.from(TaskExecutorFactory
.createTaskExecutor( "push-device-io", maxAsyncThreads, workerQueueSize,
TaskExecutorFactory.RejectionAction.CALLERRUNS ));
-
+ **/
}
@@ -308,7 +309,7 @@ public class ApplicationQueueManagerImpl implements ApplicationQueueManager {
})
.map(sendMessageFunction)
- .subscribeOn(scheduler);
+ .subscribeOn(Schedulers.io());
}, concurrencyFactor)
.distinct( queueMessage -> {
@@ -374,7 +375,7 @@ public class ApplicationQueueManagerImpl implements ApplicationQueueManager {
});
- processMessagesObservable.subscribeOn(scheduler).subscribe(); // fire the queuing into the background
+ processMessagesObservable.subscribeOn(Schedulers.io()).subscribe(); // fire the queuing into the background
}