Mirror of Apache ActiveMQ Artemis
Go to file
Bernd Gutjahr f94f8f4718 ARTEMIS-1078 Improving ActiveMQThreadPoolExecutor
This is now considering only threads waiting for the queue to get new tasks as idle.

The thread pool maintained a counter of active threads, but that counter was increased
too late in the beforeExecute method. Submitting a task created a new thread.
If now a second task was submitter before the new thread had started to execute it's task,
the second task was queued without creating a 2nd thread. So the second task was only
executed after the first task had been completed - even if the thread pool's
maximum number of thread had not been reached.

This fix now maintains the delta between the number those threads that are currently waiting
in the queue's poll or take methods as idle threads, and the number of queued tasks.
It creates new threads unless there are enough idle threads to pick up all queued tasks.

This closes #1144

(cherry picked from commit 5a31e70353)
2017-03-31 19:02:24 -04:00
.mvn/wrapper ARTEMIS-613 Artemis build enhancements 2016-07-05 15:13:35 -04:00
.settings ACTIVEMQ6-1 - Initial HornetQ Donation Commit 2014-11-10 10:31:25 -06:00
artemis-boot [maven-release-plugin] prepare for next development iteration 2017-03-07 21:46:12 -05:00
artemis-cdi-client [maven-release-plugin] prepare for next development iteration 2017-03-07 21:46:12 -05:00
artemis-cli ARTEMIS-1072: moving java-opts to /etc/artemis.profile 2017-03-27 15:03:35 -04:00
artemis-commons ARTEMIS-1078 Improving ActiveMQThreadPoolExecutor 2017-03-31 19:02:24 -04:00
artemis-core-client ARTEMIS-1036 Streaming huge messages between cluster nodes causes java.lang.OutOfMemoryError: Direct buffer memory 2017-03-29 15:09:25 +02:00
artemis-distribution NO-JIRA Update Copyright Dates 2017-03-10 13:13:31 +00:00
artemis-dto [maven-release-plugin] prepare for next development iteration 2017-03-07 21:46:12 -05:00
artemis-features [maven-release-plugin] prepare for next development iteration 2017-03-07 21:46:12 -05:00
artemis-jdbc-store ARTEMIS-930 Return the ID field on createFile statement 2017-03-13 10:20:28 +00:00
artemis-jms-client [maven-release-plugin] prepare for next development iteration 2017-03-07 21:46:12 -05:00
artemis-jms-server [maven-release-plugin] prepare for next development iteration 2017-03-07 21:46:12 -05:00
artemis-journal NO-JIRA: logger on Exception 2017-03-14 09:51:10 -04:00
artemis-junit [maven-release-plugin] prepare for next development iteration 2017-03-07 21:46:12 -05:00
artemis-maven-plugin [maven-release-plugin] prepare for next development iteration 2017-03-07 21:46:12 -05:00
artemis-native [maven-release-plugin] prepare for next development iteration 2017-03-07 21:46:12 -05:00
artemis-protocols ARTEMIS-990 Dont require Perms on MQTT mngment Q 2017-03-10 13:13:31 +00:00
artemis-ra [maven-release-plugin] prepare for next development iteration 2017-03-07 21:46:12 -05:00
artemis-rest [maven-release-plugin] prepare for next development iteration 2017-03-07 21:46:12 -05:00
artemis-selector [maven-release-plugin] prepare for next development iteration 2017-03-07 21:46:12 -05:00
artemis-server ARTEMIS-1074 Acceptors/Connectors now start up when configured to use SSL and a password codec 2017-03-28 17:40:35 -07:00
artemis-server-osgi [maven-release-plugin] prepare for next development iteration 2017-03-07 21:46:12 -05:00
artemis-service-extensions [maven-release-plugin] prepare for next development iteration 2017-03-07 21:46:12 -05:00
artemis-web [maven-release-plugin] prepare for next development iteration 2017-03-07 21:46:12 -05:00
artemis-website [maven-release-plugin] prepare for next development iteration 2017-03-07 21:46:12 -05:00
docs Update security.md 2016-12-13 10:35:56 -05:00
etc Add EditorConfig 2016-10-10 10:01:01 +02:00
examples [maven-release-plugin] prepare for next development iteration 2017-03-07 21:46:12 -05:00
integration [maven-release-plugin] prepare for next development iteration 2017-03-07 21:46:12 -05:00
scripts NO-JIRA fixing merge script on 1.x 2017-02-24 16:05:55 -05:00
tests ARTEMIS-990 Dont require Perms on MQTT mngment Q 2017-03-10 13:13:31 +00:00
.gitignore NO-JIRA: ignore of IDE configurations 2016-11-17 17:49:41 +01:00
.project More name changes to activemq 2014-11-19 16:01:54 -05:00
CMakeLists.txt ARTEMIS-163 First pass on the native AIO refactoring 2015-07-29 22:12:03 -04:00
LICENSE ARTEMIS-565 Replace json.org with javax.json 2016-07-25 21:44:57 -04:00
NOTICE NO-JIRA: update notice 2017-03-09 09:09:53 -05:00
README.md Adding OWASP reporting into pom 2016-09-13 17:06:25 +01:00
RELEASING.md Adding my releasing experience to RELEASING.md 2016-09-08 17:20:42 +01:00
artemis_doap.rdf Update vendor to ASF 2015-05-30 08:37:28 +02:00
mvnw ARTEMIS-613 Artemis build enhancements 2016-07-05 15:13:35 -04:00
mvnw.cmd ARTEMIS-613 Artemis build enhancements 2016-07-05 15:13:35 -04:00
pom.xml [maven-release-plugin] prepare for next development iteration 2017-03-07 21:46:12 -05:00

README.md

ActiveMQ Artemis

This file describes some minimum 'stuff one needs to know' to get started coding in this project.

Source

For details about the modifying the code, building the project, running tests, IDE integration, etc. see our Hacking Guide.

Building the ASYNC IO library

ActiveMQ Artemis provides two journal persistence types, NIO (which uses the Java NIO libraries), and ASYNCIO which interacts with the linux kernel libaio library. The ASYNCIO journal type should be used where possible as it is far superior in terms of performance.

ActiveMQ Artemis does not ship with the Artemis Native ASYNCIO library in the source distribution. These need to be built prior to running "mvn install", to ensure that the ASYNCIO journal type is available in the resulting build. Don't worry if you don't want to use ASYNCIO or your system does not support libaio, ActiveMQ Artemis will check at runtime to see if the required libraries and system dependencies are available, if not it will default to using NIO.

To build the ActiveMQ Artemis ASYNCIO native libraries, please follow the instructions in the artemis-native/README.

Documentation

Our documentation is always in sync with our releases at the Apache ActiveMQ Artemis website.

Or you can also look at the current master version on github.

Examples

To run an example firstly make sure you have run

$ mvn -Prelease install

If the project version has already been released then this is unnecessary.

Each individual example can be run using this command from its corresponding directory:

$ mvn verify

If you wish to run groups of examples then use this command from a parent directory (e.g. examples/features/standard):

$ mvn -Pexamples verify

Recreating the examples

If you are trying to copy the examples somewhere else and modifying them. Consider asking Maven to explicitly list all the dependencies:

# if trying to modify the 'topic' example:
cd examples/jms/topic && mvn dependency:list

Open Web Application Security Project (OWASP) Report

If you wish to generate the report for CCV dependencies, you may run it with the -Powasp profile

$ mvn -Powasp verify

The output will be under ./target/dependency-check-report.html for each sub-module.