Different channels consume different queues serially. #1344
-
hi all, e.g
It looks like the thread pool do not create new threads. The thread pool is generated by amqp-client when the connection is created, and there is nothing that can be changed to it. I did not set custom thread pool when creating conn. I'm so confused. Whether there are other factors affecting the thread pool? I try to increasing cpu/memory, but doesn't work version: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
You should use multiple connections if you wish to use multiple threads (cc @acogoluegnes). At least, that's how the .NET client works. |
Beta Was this translation helpful? Give feedback.
The Java client uses a "work service" to make sure inbound messages on a given channel are processed in sequence (whatever the consumer on this channel). This work service uses a thread pool with
Runtime.getRuntime().availableProcessors()
threads by default, but this can be overridden by providing anExecutorService
to theConnectionFactory#newConnection()
method you are using.The behavior you are experiencing should not happen if the thread pool is large enough and the consumers are registered on different channels. Please provide a standalone program or project to help us investigate if the problem persists.