In file: 

src/activemq-4.1.0/activemq-web/src/main/java/org/apache/activemq/web/MessageServlet.java

    220                         if (ajax)
    221                             writer.println("</response>");
    222
    223                         // look for next message
    224                         message = consumer.receiveNoWait();
    225                         messages++;

I suspect this block should be changed into: 
         
                        messages++; 
                        if (ajax) {
                            writer.println("</response>");

                           // look for next message
                           message = consumer.receiveNoWait();
                           messages++;
                        } 

Otherwise, in non-ajax cases, the queue will be consumed twice, with the
first message sent to the consumer 
as response, and the 2nd retrieved from queue but silently discarded. 

Thanks.
Jianxiac




-- 
View this message in context: 
http://www.nabble.com/Bug-in-MessageServlet.java-tf3555252s2354.html#a9926996
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.

Reply via email to