Details
-
Bug
-
Status: Resolved
-
Critical
-
Resolution: Fixed
-
None
-
None
Description
-Have a multi-thread consumers running to consumer messages
-Have Connection to have these :
ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(brokerUrl);
connectionFactory.setUseAsyncSend(false);
connectionFactory.setDispatchAsync(false);
connectionFactory.setAlwaysSessionAsync(false);
connectionFactory.setAlwaysSyncSend(true);
-Run the consumers for several hours and profile it
-You will see there are threads with the name "InactivityMonitor Async Task" being spawning continuously
This will cause the entire consumer system to slow down eventually due to thread context switching.
Suggestion to fix: we should not put a limit on the number of "InactivityMonitor Async Task" threads to be Max Integer. There is a bug in Java lib that
it will not stop a thread after a given idle time-to-live. We could fix this in the file InactivityMonitor.java