<DIV>hi,</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp; My java client would use memory of JVM that i defined&nbsp; by&nbsp;-Xms512m -Xmm512m. Is that normal?</DIV>
<DIV>someon tell me the reason.&nbsp;There exist another methode of client not using loop&nbsp;while(true)?</DIV>
<DIV>&nbsp;</DIV>
<DIV>thx.</DIV>
<DIV>&nbsp;</DIV>
<DIV>my code is like this:</DIV>
<DIV>&nbsp;&nbsp;Connection conn = null;<BR>&nbsp;&nbsp;ConnectionFactory factory = new ConnectionFactory();</DIV>
<DIV>&nbsp;&nbsp;factory.setHost("localhost");</DIV>
<DIV>&nbsp;&nbsp;conn = factory.newConnection();<BR>&nbsp;&nbsp;Channel chan = conn.createChannel();</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;chan.queueDeclare("your_queue" , false, false, false, null);<BR>&nbsp;&nbsp;QueueingConsumer consumer = new QueueingConsumer(chan);<BR>&nbsp;&nbsp;chan.basicConsume("your_queue", true, consumer);</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;while (true) {<BR>&nbsp;&nbsp; &nbsp;try {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; delivery = consumer.nextDelivery();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; byte msg[] = delivery.getBody();</DIV>
<DIV><BR>&nbsp;&nbsp;&nbsp; &nbsp;} catch (InterruptedException ie) {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;System.out.println("Error: " + ie);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; continue;<BR>&nbsp;&nbsp;&nbsp; }<BR>&nbsp;}</DIV>
<DIV>&nbsp;</DIV>