mirror of https://github.com/apache/activemq.git
https://issues.apache.org/jira/browse/AMQ-6184 - improve nio transport scalability; get back core pool size
This commit is contained in:
parent
934a30a327
commit
ca5912d9fa
|
@ -38,7 +38,7 @@ public final class SelectorManager {
|
||||||
private int maxChannelsPerWorker = 1024;
|
private int maxChannelsPerWorker = 1024;
|
||||||
|
|
||||||
protected ExecutorService createDefaultExecutor() {
|
protected ExecutorService createDefaultExecutor() {
|
||||||
ThreadPoolExecutor rc = new ThreadPoolExecutor(getDefaultMaximumPoolSize(), getDefaultMaximumPoolSize(), getDefaultKeepAliveTime(), TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>(),
|
ThreadPoolExecutor rc = new ThreadPoolExecutor(getDefaultCorePoolSize(), getDefaultMaximumPoolSize(), getDefaultKeepAliveTime(), TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>(),
|
||||||
new ThreadFactory() {
|
new ThreadFactory() {
|
||||||
|
|
||||||
private long i = 0;
|
private long i = 0;
|
||||||
|
@ -54,6 +54,10 @@ public final class SelectorManager {
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static int getDefaultCorePoolSize() {
|
||||||
|
return Integer.getInteger("org.apache.activemq.transport.nio.SelectorManager.corePoolSize", 10);
|
||||||
|
}
|
||||||
|
|
||||||
private static int getDefaultMaximumPoolSize() {
|
private static int getDefaultMaximumPoolSize() {
|
||||||
return Integer.getInteger("org.apache.activemq.transport.nio.SelectorManager.maximumPoolSize", 1024);
|
return Integer.getInteger("org.apache.activemq.transport.nio.SelectorManager.maximumPoolSize", 1024);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue