Is there a price to increase the number of concurrent consumers in spring AMQP

Spring AMQP says

We recommend that you increase the number of concurrent consumers to scale the consumption of messages coming from the queue.

While testing the performance of my application, I notice that increasing the number of concurrent users relative to the number of items in the queue makes the application faster. But I am wondering if there is a price paid in increasing the number of consumers? By this I mean it wastes resources on the server if I dramatically increase the number of concurrent consumers?

Ideally I'm trying to figure out what is the maximum number of concurrent consumers I can set?


source to share

1 answer

I would say this concurrency sample is no different from other Java multithreaded scripts.

The best answers to this question can be found in the Java Concurrency In Practice


And there is a classic formula for determining the best concurrecny:

enter image description here



All Articles