How does the "ConsumerDispatchConcurrency" work? (v7.2.0) #1883
Replies: 1 comment 2 replies
-
TL;DR - this is what this client library implements by default. I wanted to use your question to test the genie (AI), and it provided a very good overview of how consumer dispatch works. Let me know if you have additional questions about this feature. Based on my examination of the RabbitMQ .NET client v7.2.0 codebase, here's how Architecture OverviewThe if (_concurrency == 1)
{
worker = Task.Run(loopStart);
}
else
{
var tasks = new Task[concurrency];
for (int i = 0; i < concurrency; i++)
{
tasks[i] = Task.Run(loopStart);
}
worker = Task.WhenAll(tasks);
}Answering Your Questions1. Setting it to
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey!
ConsumerDispatchConcurrencyon a channel-level (in contrast to specifying it on a connection-level)1should be equal to the fallback (connection-levelConsumerDispatchConcurrency)2to get a dedicated dispatch thread at all?2would mean that you get 2 dedicated dispatch threads for that channel and still keep the shared one for the other channels, I guess? Or do you get a dedicated one and the shared dispatch thread will also be used?Thanks in advance! :>
Beta Was this translation helpful? Give feedback.
All reactions