am I not already already using the same socket?<br><br> public void PublishMessage(string pstrExchangeName, string pstrReturnKey, string pstrXml)<br> {<br> try<br> {<br> using (IConnection conn = new ConnectionFactory().CreateConnection("localhost:5672"))<br>
{<br> using (IModel ch = conn.CreateModel())<br> {<br> IBasicProperties props = ch.CreateBasicProperties();<br> IStreamMessageBuilder b = new StreamMessageBuilder(ch);<br>
<br> byte[] bytes = Encoding.UTF8.GetBytes(pstrXml);<br> b.WriteBytes(bytes);<br> ch.BasicPublish(pstrExchangeName, pstrReturnKey, null, bytes);<br> }<br>
}<br> }<br><br> catch (Exception ex)<br> {<br> throw ex;<br> }<br> }<br><br>and from: <a href="http://www.rabbitmq.com/faq.html">http://www.rabbitmq.com/faq.html</a> <br>
<snip><br>Q. How fast is RabbitMQ in persistent mode?<br><br>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. <br>
</snip><br><br>I am not even remotely seeing this kind of performance on better then twice the hardware...<br><br>am i missing something ?<br><br>thanks in advance.<br><br>re:<br><div class="gmail_quote">On Tue, Sep 1, 2009 at 4:10 AM, Tony Garnock-Jones <span dir="ltr"><<a href="mailto:tonyg@lshift.net">tonyg@lshift.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">Patrick Kenney wrote:<br>
> seemed to closely resemble the condition, as I am sending 4000 copies of<br>
> the same message to the following method...<br>
<br>
</div>Your operating system is probably running out of sockets. Try holding a<br>
single connection open and reusing it for all the deliveries, rather<br>
than opening a connection for each delivery. Connections are relatively<br>
heavyweight compared to calls to BasicPublish.<br>
<div class="im"><br>
> I am thinking I am hitting some kind of configurable threshold in the<br>
> RabbitMQ Client and or RabbitMQ ServiceModel... but have been unable<br>
> thus far to pin it down...<br>
<br>
</div>It is more likely to be an operating system (or TCP, depending on how<br>
you look at it) limitation. Neither the C# client, the WCF binding, nor<br>
the RabbitMQ server have any preconfigured limitations of this kind.<br>
<div class="im"><br>
> Another interesting thing is that this exact code works unchanged on a<br>
> much older, slower Pentium IV 2ghz, 2gig ram on windows xp pro vs.<br>
> windows server 2003 enterprise sp2... quad core xeon, 4gig, etc...<br>
<br>
</div>If it is socket exhaustion you're seeing, one possible explanation for<br>
the slower machine working better is that it gives the TCP timeouts<br>
longer to run, so sockets are getting recycled "faster" from the<br>
point-of-view of the slower socket-requiring code.<br>
<br>
Regards,<br>
Tony<br>
<font color="#888888">--<br>
[][][] Tony Garnock-Jones | Mob: +44 (0)7905 974 211<br>
[][] LShift Ltd | Tel: +44 (0)20 7729 7060<br>
[] [] <a href="http://www.lshift.net/" target="_blank">http://www.lshift.net/</a> | Email: <a href="mailto:tonyg@lshift.net">tonyg@lshift.net</a><br>
</font></blockquote></div><br>