[ 
https://issues.apache.org/activemq/browse/AMQ-2523?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gary Tully resolved AMQ-2523.
-----------------------------

       Resolution: Fixed
    Fix Version/s: 5.4.0

resolved in r895975

Changed to use a shared pool thread pool limited to 10 threads. 
This change identified an issue where messages waiting for dispatch when memory 
is full could remain in the pending list if a subsequent send resulted in the 
memory limit being reached again. This was resolved by re registering a not 
full callback if sending could not complete. In some situations (reaching small 
memory limits) this could lead to a hung consumer.

> 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
>            Assignee: Gary Tully
>             Fix For: 5.3.1, 5.4.0
>
>
> 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.

Reply via email to