Using ActiveMQ > Configure version 6 Virtual Threads
ActiveMQ support for Virtual Threads is in Technology Preview stage. Virtual Thread support is implemented using multi-release jar, so no special changes to the distribution are required.
To enable Virtual Threads in ActiveMQ 6.3.x (and higher)
Run Apache ActiveMQ 6.3.0 (or higher)
Run with Java JDK 25 (or newer)
Edit conf/activemq.xml
<broker ... virtualThreadTaskRunner=“true” .. >
Run ActiveMQ and confirm with the following log message:
INFO | VirtualThreadExecutor initialized name:ActiveMQ BrokerService[localhost] Task
NOTE: The log message may be removed in the future
Virtual Thread support was released with ActiveMQ v6.3.0. User feedback is welcome! Please open a GitHub issue with questions and comments.
JIRA|Status|Target Version|Completed Version|Feature|Notes ---|---|--- AMQ-9394 | PR #1172 | 6.2.0 | 6.3.0 | Task Runner Factory | Tech Preview support to allow Virtual Thread Executor Service
JDK 25 (or newer) should always be used when running Virtual Threads to avoid thread pinning.
Technical factors:
JDK thread pinning improvement: ref: https://mail.openjdk.org/pipermail/loom-dev/2024-May/006632.html