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