activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sigurd Knippenberg (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AMQ-2671) Shared thread pool created by setting UseDedicatedTaskRunner=false should be configurable
Date Wed, 12 Oct 2011 19:39:11 GMT

    [ https://issues.apache.org/jira/browse/AMQ-2671?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13126080#comment-13126080
] 

Sigurd Knippenberg commented on AMQ-2671:
-----------------------------------------

There also exists the DefaultThreadPools class which has a final static instance of the TaskRunnerFactory.
You can't really override that using Spring. The other place I could not set it using Spring
were the connections that were created through the PooledConnectionFactory. So I had to subclass
that class as well to provide a way for me to override which TaskRunnerFactory should be used.


The main problem I have with the default configuration is that it sets the time to live for
idle threads in the pool to 10 seconds. This meant that for my application it was creating
and destroying thousands of threads every day. I set it to 1 hour using reflection and the
above configuration/overriding of classes I mentioned, and that resolved all the problems.

Maybe in addition to making it configurable we should also look at possibly using a different
default setting?
                
> Shared thread pool created by setting UseDedicatedTaskRunner=false should be configurable
> -----------------------------------------------------------------------------------------
>
>                 Key: AMQ-2671
>                 URL: https://issues.apache.org/jira/browse/AMQ-2671
>             Project: ActiveMQ
>          Issue Type: Improvement
>    Affects Versions: 5.3.1
>            Reporter: Joe Luo
>             Fix For: 5.x
>
>
> ActiveMQ can optionally use internally a shared thread pool to control dispatching of
messages if setting UseDedicatedTaskRunner=false. However, there is not much configuration
exposed to allow configuring this shared thread pool. The only way is to set your own impl
of the TaskRunnerFactory on the broker.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message