<div><div style="font-family: 'lucida Grande', Verdana; line-height: 23px;">pls check my code below:</div><div style="font-family: 'lucida Grande', Verdana; line-height: 23px;"><br></div><div style="font-family: 'lucida Grande', Verdana; line-height: 23px;"><div>String message = client.getNextMessage();</div><div>if (message != null && !message.equals("")) {</div><div><span class="Apple-tab-span" style="white-space: pre;">    </span>client.sendMessage(imqRec.handler(message));</div><div>}</div></div><div style="font-family: 'lucida Grande', Verdana; line-height: 23px;"><div><br></div><div><br></div><div>If I use while(true) loop continuously monitor RPC queue, it would be very resource intensive, whether you grab a message per sec or anything else��</div></div></div>