Excellent - thanks for the response.<br><br>- Jim<br><br>Jim Irrer <a href="mailto:irrer@umich.edu">irrer@umich.edu</a> (734) 647-4409<br>University of Michigan Hospital Radiation Oncology<br>519 W. William St. Ann Arbor, MI 48103<br>
<br><br><div class="gmail_quote">On Fri, Jul 8, 2011 at 11:16 AM, Michael Klishin <span dir="ltr"><<a href="mailto:michael.s.klishin@gmail.com">michael.s.klishin@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br><br><div class="gmail_quote"><div class="im">2011/7/8 Jim Irrer <span dir="ltr"><<a href="mailto:irrer@umich.edu" target="_blank">irrer@umich.edu</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>For the Java client API, the RabbitMQ documentation says that<div>a single channel should not be used by more than one thread, but</div><div>it does not explicitly say anything about connections.</div>
<div><br></div></div></blockquote></div><div><br>AMQP assumes that one connection is typically used by more than one channel. So<br> </div><div class="im"><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">
<div><div></div><div>Is it ok to have multiple threads (each with their own channel)</div><div>sharing the same connection?</div></div></blockquote></div><div><br>if channels are not shared between threads, then yes.<br>
</div><div class="im"><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex"><div><div>Is there some advantage (performance</div><div>or otherwise) to using a single connection verses multiple ones?</div>
</div></blockquote></div><div><br>If all connections use the same credentials and connect to the same broker/vhost, then no<br>(this should read: in vast majority of cases, no).<br> </div><div class="im"><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">
<div>
<div>BTW - I'm assuming that each connection corresponds to a</div><div>socket, and so opening lots of them consumes a somewhat limited</div><div>system resource.</div></div></blockquote></div></div><br>Long story short, this is true. Each connection has a frame handler that opens a new socket.<br>
<font color="#888888">
-- <br>MK<br><br><a href="http://github.com/michaelklishin" target="_blank">http://github.com/michaelklishin</a><br><a href="http://twitter.com/michaelklishin" target="_blank">http://twitter.com/michaelklishin</a><br><br>
</font></blockquote></div><br>