The thread pool on the client is just for executors and other shared
threads.

Like if you have a MessageListener, the client will call an
executor.execute(....); when a listener is called.
So if you have multiple connections on your client (from different
connection factories) we wouldn't be creating threads like crazy.

Unless you are doing something crazy (many, many threads) this shouldn't be
an issue. It was meant to share the thread pool between multiple clients
and clients towards different servers.


On Fri, Nov 11, 2022 at 10:01 AM John Lilley
<john.lil...@redpointglobal.com.invalid> wrote:

> Greetings,
>
>
>
> We are using AMQ/Artemis to build a set of RPC-style services.  We
> discovered that Artemis (by default) uses a global thread pool for all
> consumers, whereas AMQ classic created a new thread every time we make a
> consumer and call setMessageListener().  At least I *think* that’s what
> happened in AMQ classic.  Generally I like the thread-pool model better,
> but it makes me question whether our current approach is still correct.
>
>
>
> Our approach is as follows.  A service processing a request queue that
> wants to use N threads, then for each thread we
>
>    - Get the singleton Connection
>    - Create a new Session
>    - Create a new MessageConsumer on the queue
>    - Create a MessageProducer to return RPC responses on the reply-to
>    queues
>    - Call setMessageListener() on the consumer
>
>
>
> Is this the best pattern for Artemis?  In AMQ classic we were able to
> share the Session across consumers, but this is does not seem to be allowed
> in Artemis.
>
>
>
> If the consumers are stateless, is there a way to get N multi-threading
> without creating N consumers?  Or must I have a consumer per thread?
>
>
>
> Thanks
>
> john
>
> [image: rg] <https://www.redpointglobal.com/>
>
> John Lilley
>
> Data Management Chief Architect, Redpoint Global Inc.
>
> 888 Worcester Street, Suite 200 Wellesley, MA 02482
>
> *M: *+1 7209385761 <+1%207209385761> | john.lil...@redpointglobal.com
>
> 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.
>


-- 
Clebert Suconic

Reply via email to