git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@540142 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
James Strachan 2007-05-21 13:48:10 +00:00
parent 6641ef3ae7
commit b043ebef4e
1 changed files with 6 additions and 4 deletions

View File

@ -336,16 +336,18 @@ public class MessageListenerServlet extends MessageServletSupport {
continue;
// Look for any available messages
message = consumer.receiveNoWait();
while (message != null && messages < maximumMessages) {
while (messages < maximumMessages) {
message = consumer.receiveNoWait();
if (message == null) {
break;
}
messages++;
String id = (String) consumerIdMap.get(consumer);
writer.print("<response id='");
writer.print(id);
writer.print("'>");
writeMessageResponse(writer, message);
writer.println("</response>");
messages++;
message = consumer.receiveNoWait();
}
}