On Dec 10, 2010, at 11:06 AM, Jeff Rose wrote:

> Hi,
>  Based on the ajax chat example I've put together a small test page to
> display messages that I post to a topic or queue using a php script.  When I
> send 10 messages in a for loop from PHP then the ajax handler is only
> getting called with a couple of the messages though.  Looking at ActiveMQ
> with jconsole I can see that all of the messages are getting taken off the
> queue, but they don't all get to the browser.  Do I need to do something
> special in order to make sure I get all of the messages?
> 
> The relevant code is posted below.  Any thoughts or advice would be
> appreciated.

I've noticed the same issue recently.  If I publish 5 messages via a ruby+stomp 
publisher, I receive all 5 in a ruby+stomp consumer, but I only see 1 message 
in a javascript/ajax consumer. The <ajax-response> XML element always has only 
a single <response> element.  (I can see this in Firebug.)  The admin webapp 
shows that all my messages are being de-queued, so I think the ajax servlet is 
picking up the messages but failing to deliver them to the browser.

Just this morning I was poking around in the code trying to see what's going 
on.  I have a guess it's in MessageListenterServelet.doMessages().  There's 
some code in there which should put multiple <response> elements into a single 
<ajax-response>, but it's not happening for some reason.

Maybe we should open a ticket for this?

alex

Reply via email to