separate thread pool per Usage requires lots of threads when separate
MemoryUsage defined for each destination
--------------------------------------------------------------------------------------------------------------
Key: AMQ-2523
URL: https://issues.apache.org/activemq/browse/AMQ-2523
Project: ActiveMQ
Issue Type: Improvement
Components: Broker
Affects Versions: 5.3.0
Reporter: Mario Lukica
Have a system with couple of hundreds of queues configured, each with separate
MemoryUsage (separate SLA enforcements).
Each (Memory)Usage has separate ThreadPoolExecutor (corePoolSize: 1,
maximumPoolSize: 1 ...) used for notifying interested listeners when usage
changes or drops below 100%, which basically means that for each started queue
with MemoryUsage, additional thread is created, e.g named:
Main:memory:queue://queueX:memory Usage Thread Pool
This starts a few hundred threads, which increase system load.
Is it possible to share some thread pool for all MemoryUsages, or somehow
decrease number of threads required for usage monitoring?
BTW, executor will be created even when no listeners are registered on given
Usage (it will run following runnable iterating over empty list in fireEvent()):
Runnable listenerNotifier = new Runnable() {
public void run() {
for (Iterator<UsageListener> iter = listeners.iterator();
iter.hasNext();) {
UsageListener l = iter.next();
l.onUsageChanged(Usage.this, oldPercentUsage,
newPercentUsage);
}
}
};
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.