-
2. Re: Wildfly 10 Final indefinitely creating ActiveMQ-client-global-threads
johntk Feb 23, 2016 5:46 AM (in response to jbertram)Thanks for the response, after reading the link you posted I can see now that I need to setup client side thread management, so currently I'm using :
DEFAULT_CONNECTION_FACTORY=jms/RemoteConnectionFactory
DEFAULT_DESTINATION=java:/jms/queue/demoQueue
DEFAULT_USERNAME=mUserName
DEFAULT_PASSWORD=myPassword
INITIAL_CONTEXT_FACTORY=org.jboss.naming.remote.client.InitialContextFactory
PROVIDER_URL=http-remoting://myURL.com:8082/** Lookup the queue object */
Queue queue = (Queue) context.lookup(props.getProperty("DEFAULT_DESTINATION"));
/** Lookup the queue connection factory */
ConnectionFactory connFactory = (ConnectionFactory) context.lookup(props.getProperty("DEFAULT_CONNECTION_FACTORY"));try (javax.jms.Connection connection = connFactory.createConnection(props.getProperty("DEFAULT_USERNAME"), props.getProperty("DEFAULT_PASSWORD"));
/** Create a queue session */
Session queueSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
/** Create a queue consumer */
MessageConsumer msgConsumer = queueSession.createConsumer(queue)) {/** Set an asynchronous message listener */
msgConsumer.setMessageListener(asyncReceiver);
/** Set an asynchronous exception listener on the connection */
connection.setExceptionListener(asyncReceiver);
/** Start connection */
connection.start();}
Do I need to add the "
ClientSessionFactory"
configuration to my "standalone-full.xml" for client side thread managementI can't access the
.setUseGlobalPools(falase); from the RemoteConnectionFactory.
-
3. Re: Wildfly 10 Final indefinitely creating ActiveMQ-client-global-threads
jbertram Feb 23, 2016 10:20 AM (in response to johntk)You can set the necessary properties on the server-side in the XML configuration for your RemoteConnectionFactory, e.g.:
<connection-factory name="RemoteConnectionFactory" entries="java:jboss/exported/jms/RemoteConnectionFactory" connectors="http-connector" use-global-pools="false" thread-pool-max-size="10"/>
-
4. Re: Wildfly 10 Final indefinitely creating ActiveMQ-client-global-threads
johntk Feb 24, 2016 11:40 AM (in response to jbertram)Thanks for your help with this, I was so close to figuring the problem, I couldn't figure out the right way to implement the use-global-pools="false" thread-pool-max-size="10" inside my standalone.xml my system has been up for 24 hours now without a hitch.
This was important for me, thank you.
-
5. Re: Wildfly 10 Final indefinitely creating ActiveMQ-client-global-threads
lukaszpater Mar 7, 2016 7:53 AM (in response to jbertram)Hello
I have the same problem when the consumer of the message is a Message Driven Bean. The server is slowly creating ActiveMQ-client-global-threads till it runs out of memory. Moreover all threads remain (and new are created) when redeploying the same application.
Many thanks
Lukasz
-
6. Re: Wildfly 10 Final indefinitely creating ActiveMQ-client-global-threads
jbertram Mar 7, 2016 2:00 PM (in response to lukaszpater)If you're using an MDB then the corresponding configuration would be to specify the "useGlobalPools" and "threadPoolMaxSize" activation configuration properties on the MDB as appropriate.
-
7. Re: Wildfly 10 Final indefinitely creating ActiveMQ-client-global-threads
lukaszpater Mar 8, 2016 7:54 AM (in response to jbertram)Many thanks Justin for your answer. Although it has helped (the threads are created much slower and there are no problems with redeployment) the system still keeps on creating ActiveMQ-client-global-threads. Each few minutes the system creates at the same time ActiveMQ-client-global-thread and ActiveMQ-remoting-thread. The latter one is removed after few seconds and the former one remains in the memory.
-
8. Re: Wildfly 10 Final indefinitely creating ActiveMQ-client-global-threads
jmesnil Mar 15, 2016 10:27 AM (in response to lukaszpater)This might be related to 500 ActiveMQ-client-global-threads pool in Wildfly 10.0.0.Final