> Can Artemis be configured with "elastic" pools that expand and contract dynamically?
This is the default behavior. The client thread pools will expand to their max configured size and then shrink back down as threads which are idle 60 seconds are removed. To be clear, the default "threadPoolMaxSize" is "-1" (i.e. unbounded). > Has the Artemis JMS client been validated against Java 21 virtual threads? I'm not exactly sure what you mean by "validated," but the client in question can be and has been used with virtual threads. I'm not aware of any issues other than occasional pinning as discussed on ARTEMIS-4937 [1]. > Can I just replace the thread factory to create virtual threads instead? You can set the Executors used by the underlying ServerLocator using the setThreadPools method [2]. You can get the ServerLocator from your instance of ActiveMQConnectionFactory using getServerLocator. Justin [1] https://issues.apache.org/jira/browse/ARTEMIS-4937 [2] https://activemq.apache.org/components/artemis/documentation/javadocs/javadoc-latest/org/apache/activemq/artemis/api/core/client/ServerLocator.html#setThreadPools(java.util.concurrent.Executor,java.util.concurrent.ScheduledExecutorService,java.util.concurrent.Executor) On Fri, Dec 13, 2024 at 2:51 PM John Lilley <john.lil...@redpointglobal.com> wrote: > Our java clients are artemis JMS 2.32, but we can and will keep updating. > Our application is written using almost entirely the "RPC" pattern: > - Post a request packet to service queue > - Block the caller thread waiting for a response in reply-to queue > - Process the result > > While procedural programming with blocking RPC calls is easy, there are > problems with resource use and potential deadlock (all service threads > busy, but then someone makes a recursive RPC call). Some members of our > team advocate for a purely "reactive" model to solve these problems, but it > is harder to understand and debug. > > This leads me to a few questions: > - Deadlock is only a concern with fixed thread pools. Can Artemis be > configured with "elastic" pools that expand and contract dynamically? > - Has the Artemis JMS client been validated against Java 21 virtual > threads? Can I just replace the thread factory to create virtual threads > instead? > > PLEASE NOTE: This e-mail from Redpoint Global Inc. ("Redpoint") is > confidential and is intended solely for the use of the individual(s) to > whom it is addressed. If you believe you received this e-mail in error, > please notify the sender immediately, delete the e-mail from your computer > and do not copy, print or disclose it to anyone else. If you properly > received this e-mail as a customer, partner or vendor of Redpoint, you > should maintain its contents in confidence subject to the terms and > conditions of your agreement(s) with Redpoint. >