<div dir="ltr"><font face="tahoma, sans-serif">Hi</font><div><ol><li><span style="font-family:tahoma,sans-serif"><i>could I use a channel for many (about 20) producers?</i></span></li><li><span style="font-family:tahoma,sans-serif"><i>could I use a channel for many (about 20) consumers?</i></span></li>

<li><span style="font-family:tahoma,sans-serif"><i><i style="font-family:arial"><span style="font-family:tahoma,sans-serif">How cloud I increase the </span>socket descriptors from 829 to 2000? (in RHEL 5)</i>
</i></span></li>
</ol><div>the problem raise from limitations of socket descriptors. I have about 50 weather evaluation station (there are actually a PC with some stuff) and each station connects to 20 queue. and a server (a <span><em>HP</em> ProLiant <em>DL380</em></span>) that runs the rabbitMQ server. there is also about 40 consumer (for each queue there is 2 consumer). at start I create one channel for every connection to every queue. soon I face socket descriptors limitations (it&#39;s actually 829). So I share the channel among producers:</div>


</div><div><br></div><div><div><font color="#000066"><span style="white-space:pre-wrap">        </span>//in each weather evaluation station this code is running</font></div><div><font color="#000066"><span style="white-space:pre-wrap">        </span>factory = new ConnectionFactory();</font></div>


<div><font color="#000066"><span style="white-space:pre-wrap">        </span>factory.setUri(toURI);</font></div><div><font color="#000066"><span style="white-space:pre-wrap">        </span>connection = factory.newConnection();</font></div>

<div><font color="#000066"><span style="white-space:pre-wrap">        </span>channel = connection.createChannel();</font></div>
<div><font color="#000066"><span style="white-space:pre-wrap">        </span>for(int i =0; i&lt; 20; i++) </font></div></div><div><font color="#000066"><span style="white-space:pre-wrap">        </span><span style="white-space:pre-wrap">        </span>
WeatherProducer basicProducer = new 
WeatherProducer(i , channel);</font></div><div><span style="white-space:pre-wrap">        </span></div><div>and in consumers I do the same.</div><div><br></div><div><div><div><font color="#000066"><span style="white-space:pre-wrap">        </span>//in each weather evaluation station this code is running</font></div>


<div><font color="#000066"><span style="white-space:pre-wrap">        </span>factory = new ConnectionFactory();</font></div><div><font color="#000066"><span style="white-space:pre-wrap">        </span>factory.setUri(toURI);</font></div>

<div><font color="#000066"><span style="white-space:pre-wrap">        </span>connection = factory.newConnection();</font></div>
<div><font color="#000066"><span style="white-space:pre-wrap">        </span>channel = connection.createChannel();</font></div><div><font color="#000066"><span style="white-space:pre-wrap">        </span>for(int i =0; i&lt; 20; i++) 
</font></div><div><font color="#000066"><span style="white-space:pre-wrap">        </span><span style="white-space:pre-wrap">        </span>for(int j =0; j&lt; 20; i++) </font></div></div><div><font color="#000066"><span style="white-space:pre-wrap">        </span><span style="white-space:pre-wrap">        </span><span style="white-space:pre-wrap">        </span>WeatherConsumer basicConsumer = new  
WeatherConsumer (j , channel);</font></div><br></div><div>the problem is that in my WeatherConsumer when I try to read a message (with nextDelivery() ) the thread go to wait! So I guess the problems raise from using a channel for many consumers.</div>

<div><br></div><div>thanks for your attention.</div><div><div><br></div>-- <br><div dir="ltr"><font style="color:rgb(51,0,153);font-family:tahoma,sans-serif"><span><span><span><br><span style="color:rgb(0,0,0)">Sincerely </span><br style="color:rgb(0,0,0)">


<span style="color:rgb(0,0,0)">ML</span></span></span></span></font><br></div><br>
</div></div>