Thanks for the input. This is exactly the type of info I&#39;m looking for!<br><br><div class="gmail_quote">On Fri, Mar 9, 2012 at 4:48 AM, Marek Majkowski <span dir="ltr">&lt;<a href="mailto:majek04@gmail.com">majek04@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Thu, Mar 8, 2012 at 23:51, Glen Wagley &lt;<a href="mailto:glen.wagley@gmail.com">glen.wagley@gmail.com</a>&gt; wrote:<br>

&gt; I&#39;m experimenting with rabbitmq to replace our current message queuing<br>
&gt; implementation. Currently our test system is comprised of a REST web<br>
&gt; service, a 3-node rabbitmq cluster, and a windows service. The REST service<br>
&gt; acts as a front-end for our clients to send data to which then gets<br>
&gt; published from the REST service to our rabbitmq cluster. The windows service<br>
&gt; has multiple subscriber threads that consume the messages from the cluster<br>
&gt; and do things like insert data from the message into a relational database,<br>
&gt; send an email containing the message contents, etc.<br>
&gt;<br>
&gt; Right now I am trying to figure out if I am limiting throughput to the<br>
&gt; cluster because each instance of the REST service and each instance of the<br>
&gt; windows service only has one connection to the cluster BUT multiple<br>
&gt; channels. We support about two dozen message types right now and I&#39;ve<br>
&gt; created a channel for each one. Some channels have a lot of messages flowing<br>
&gt; through while some have little to none depending on the day. Is there a<br>
&gt; recommended approach to number of connections vs channels? We are starting<br>
&gt; to load test the system and I am trying to understand what could be tweaked<br>
&gt; to improve performance/throughput. Thanks.<br>
<br>
</div></div>Glen,<br>
<br>
There aren&#39;t any specific guidelines about connections vs channels.<br>
Depending on the application, it may be more convenient to use<br>
multiple connections or channels. Use what is more convenient.<br>
<br>
Of course, if possible you should reduce number of<br>
connections - connections consume constrained resources<br>
(file descriptors).<br>
<br>
<br>
Having said that there is one particular case when you could<br>
benefit from having multiple connections.<br>
<br>
In a situation when RabbitMQ runs of memory (high memory<br>
watermark), it will stop accepting new messages. But due to the<br>
limitations of AMQP protocol, it can&#39;t �be done on per-channel<br>
basis - a full connection will be stopped in such case.<br>
<br>
To rephrase - when rabbit runs out of memory the connections<br>
on which messages are being published will be temporarily<br>
throttled. You won&#39;t be able to do anything on that connection<br>
until rabbit recovers - that includes consuming messages.<br>
<br>
So, if you wish to be shielded against this situation, you<br>
may want to keep publishers on a separate connection<br>
than consumers. That will ensure that even in the<br>
out-of-memory case the consumers will be able to do their<br>
job (and thus help rabbitmq free memory faster)<br>
<br>
Hope that helps,<br>
 �Marek<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Glen Wagley &lt;<a href="mailto:glen.wagley@gmail.com">glen.wagley@gmail.com</a>&gt;<br>