Replies: 1 comment 4 replies
-
I am highly skeptical that this supposedly fine-grained control will actually work as expected. The underlying concurrency are not per-consumer and neither is prefetch by default and in most systems. Concurrency controls are meant to In other clients doing so would mean maintaining a thread pool or executor per consumer, which would be a complete overkill. If some of your consumers are high throughput and others are not, use two consumer connections, or three, or five. If you need more than that, your concurrency controls will likely only provide intellectual satisfaction and not any resource efficiency gains. |
Beta Was this translation helpful? Give feedback.
-
Is your feature request related to a problem? Please describe.
Currently if we want concurrent processing we need to set ConsumerDispatchConcurrency on the connection to > 1 (preferably in an AsyncBasicConsumer). This value can be tuned together with the Prefetch count to achieve desired throughput.
If your program contains multiple consumers and you want to have each configured with a different throughout then ConsumerDispatchConcurrency should (in theory) be set to the max of what is needed on each individual consumer as it is a global on the connection. There can also be combinations that are not possible without using a separate connection per consumer.
Describe the solution you'd like
Have ConsumerDispatchConcurrency be a setting on the Consumer instead of on the Connection.
Describe alternatives you've considered
No response
Additional context
Please let me know if I am missing some knowledge related to usage, such that it is preferred to use multiple connections per program to isolate consumers.
Beta Was this translation helpful? Give feedback.
All reactions