[rabbitmq-discuss] .NET Client ConnectionFactory threading issues

Matthias Radestock matthias at rabbitmq.com
Mon Apr 29 18:15:15 BST 2013


On 22/04/13 17:07, Chris Haines wrote:
> The reason we want to do this is because we have a highly concurrent
> application serving around 300-600 threads each with its own consumer
> and a set of publishers. We were seeing poor throughput over one
> connection and I did some tests which show higher data throughput when
> using a larger number of connections. The only problem we seem to have
> with it is with the concurrent usage of the ConnectionFactory. I have
> gotten around this for now by creating all of the connections on the
> startup thread and after that the connections are shared between all of
> the threads and we see better performance. The broker seems to cope fine
> with about 1250 connections (running several instances of our server
> application).
> I have asked my colleagues to run this as well and they are seeing the
> same symptoms. We are all running Win7 64 as well.

I am not a .net expert, but some quick googling suggests that .net has a 
default thread pool with some "interesting" policies on thread creation, 
namely that new threads are only created at a rate of 2Hz. See 
http://stackoverflow.com/a/6000891. Looks like increasing the *min* 
threads setting would address that.



More information about the rabbitmq-discuss mailing list