Thanks Marek, now my every consumer use 10 threads and each thread use one channel ,i have 15 consumers ,so on the rabbitmq server it has 150 channels <div><br></div><div>it's seems work ok. <br><br><div class="gmail_quote">
2010/11/22 Marek Majkowski <span dir="ltr"><<a href="mailto:majek04@gmail.com">majek04@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Mon, Nov 22, 2010 at 07:38, ³Âΰƽ <<a href="mailto:coolchen033@gmail.com">coolchen033@gmail.com</a>> wrote:<br>
> so rabbitmq server has so many channels,how many channels rabbitmq server<br>
> can support ? or i should modify code for Multithread use same channel ?<br>
<br>
</div>RabbitMQ doesn't impose any limit on channels. Theoretically you may<br>
create as many channels as you have free erlang-process-ids. Which<br>
is usually about 32k.<br>
<br>
But in practice RabbitMQ shouldn't be using too many channels.<br>
If you're using more than a dozen of channels for a consumer, you're<br>
probably doing something wrong.<br>
<br>
You may run multiple 'basic.consumes' on one channel. But when you<br>
share a channel between threads remember to make sure the access<br>
is synchronized.<br>
<br>
Cheers,<br>
<font color="#888888"> Marek<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Kevin Chan<div><br></div><div>XiaMen China</div><div><br></div><div><br></div><div><font face="arial, sans-serif" size="6"><span style="font-size:24px"><br></span></font></div>
<br>
</div>