[rabbitmq-discuss] Error: RabbitMQ.Client.ConnectionFactory.cs - "Only one usage of each socket address (protocol/network address/port) is normally permitted"

Patrick Kenney pekenney at gmail.com
Tue Sep 1 15:11:30 BST 2009

am I not already already using the same socket?

        public void PublishMessage(string pstrExchangeName, string
pstrReturnKey, string pstrXml)
                using (IConnection conn = new
                    using (IModel ch = conn.CreateModel())
                        IBasicProperties props = ch.CreateBasicProperties();
                        IStreamMessageBuilder b = new

                        byte[] bytes = Encoding.UTF8.GetBytes(pstrXml);
                        ch.BasicPublish(pstrExchangeName, pstrReturnKey,
null, bytes);

            catch (Exception ex)
                throw ex;

and from: http://www.rabbitmq.com/faq.html
Q. How fast is RabbitMQ in persistent mode?

A. From our testing, we expect easily-achievable throughputs of 4000
persistent, non-transacted one-kilobyte messages per second (Intel Pentium
D, 2.8GHz, dual core, gigabit ethernet) from a single RabbitMQ broker node
writing to a single spindle.

I am not even remotely seeing this kind of performance on better then twice
the hardware...

am i missing something ?

thanks in advance.

On Tue, Sep 1, 2009 at 4:10 AM, Tony Garnock-Jones <tonyg at lshift.net> wrote:

> Patrick Kenney wrote:
> > seemed to closely resemble the condition, as I am sending 4000 copies of
> > the same message to the following method...
> Your operating system is probably running out of sockets. Try holding a
> single connection open and reusing it for all the deliveries, rather
> than opening a connection for each delivery. Connections are relatively
> heavyweight compared to calls to BasicPublish.
> > I am thinking I am hitting some kind of configurable threshold in the
> > RabbitMQ Client  and or RabbitMQ ServiceModel... but have been unable
> > thus far to pin it down...
> It is more likely to be an operating system (or TCP, depending on how
> you look at it) limitation. Neither the C# client, the WCF binding, nor
> the RabbitMQ server have any preconfigured limitations of this kind.
> > Another interesting thing is that this exact code works unchanged on a
> > much older, slower Pentium IV 2ghz, 2gig ram on windows xp pro vs.
> > windows server 2003 enterprise  sp2... quad core xeon, 4gig, etc...
> If it is socket exhaustion you're seeing, one possible explanation for
> the slower machine working better is that it gives the TCP timeouts
> longer to run, so sockets are getting recycled "faster" from the
> point-of-view of the slower socket-requiring code.
> Regards,
>  Tony
> --
>  [][][] Tony Garnock-Jones     | Mob: +44 (0)7905 974 211
>   [][] LShift Ltd             | Tel: +44 (0)20 7729 7060
>  []  [] http://www.lshift.net/ | Email: tonyg at lshift.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20090901/3f6a49a5/attachment.htm 

More information about the rabbitmq-discuss mailing list