<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<STYLE type=text/css> <!--@import url(scrollbar.css); --></STYLE>
<META content="text/html; charset=utf-8" http-equiv=Content-Type>
<STYLE>                        BLOCKQUOTE{margin-Top: 0px; margin-Bottom: 0px; margin-Left: 2em}                        body{FONT-SIZE:12.1pt; COLOR:#001; FONT-FAMILY:宋体,serif;}                </STYLE>
<META name=GENERATOR content="MSHTML 10.00.9200.16721"><BASE
target=_blank></HEAD>
<BODY
style="BORDER-LEFT-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; MARGIN: 12px; LINE-HEIGHT: 1.3; BORDER-TOP-WIDTH: 0px"
marginheight="0" marginwidth="0"><STATIONERY>
<DIV><FONT color=#000000 size=3 face=宋体>hi,all</FONT></DIV>
<DIV><FONT color=#000000 size=3></FONT> </DIV>
<DIV><FONT color=#000000 size=3>i use "rabbitmqctrl list_queues" to list the
queues in my computer and the result is like this:</FONT></DIV>
<DIV><FONT color=#000000 size=3></FONT> </DIV>
<DIV><FONT color=#000000 size=3><IMG
src="cid:flashmail$ZG1OAAnj$1382406027__0@nmmp"></FONT></DIV>
<DIV><FONT color=#000000 size=3></FONT> </DIV>
<DIV><FONT color=#000000 size=3>that is to say ,there are 17 messages in
youdao_box_ctp queue and by the way,the queue is defined like this:</FONT></DIV>
<DIV><FONT color=#000000 size=3></FONT> </DIV>
<DIV>channelSTC.queueDeclare("youdao_box_ctp", true, false, false, null);</DIV>
<DIV><FONT color=#000000 size=3></FONT> </DIV>
<DIV><FONT color=#000000 size=3>here is my code to get the message:</FONT></DIV>
<DIV><FONT color=#000000 size=3></FONT> </DIV>
<DIV> ConnectionFactory factoryCTP = new
ConnectionFactory();<BR>
factoryCTP.setHost("localhost");<BR> Connection
connectionProxy=factoryCTP.newConnection();<BR> Channel
channameProxy=connectionProxy.createChannel();<BR>
channameProxy.queueDeclare("youdao_box_ctp", true, false, false,
null);<BR>
channameProxy.basicQos(1);<BR>
while(true)<BR> {<BR>
GetResponse response = channameProxy.basicGet("youdao_box_ctp",
false);<BR>
if(response!=null)<BR>
{<BR>
channameProxy.basicAck(response.getEnvelope().getDeliveryTag(),
false);<BR>
}<BR>
else<BR>
{<BR>
System.out.println("empty");<BR>
}<BR> }</DIV>
<DIV> </DIV>
<DIV>it prints "empty" !!!! why???there are 17 messages in
youdao_box_ctp!!!</DIV>
<DIV> </DIV>
<DIV>the same thing happened to the other queues also</DIV>
<DIV> </DIV>
<DIV>thanks a lot</DIV>
<DIV> </DIV>
<DIV align=left><FONT color=#c0c0c0 size=2
face=Verdana>2013-10-22</FONT></DIV><FONT size=2 face=Verdana>
<HR id=SignNameHR style="HEIGHT: 2px; WIDTH: 122px" align=left SIZE=2>
</FONT>
<DIV><FONT color=#c0c0c0 size=2 face=Verdana><SPAN
id=_FlashSignName>yby538</SPAN></FONT></DIV></STATIONERY></BODY></HTML>