activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Dean <a...@crackpot.org>
Subject Re: ActiveMQ "message" defined?? from the docs/web links
Date Fri, 28 Jan 2011 13:58:37 GMT

On Jan 27, 2011, at 10:25 AM, habumaster wrote:

> 
> "3.	A HTTP response is returned to the client containing all available
> messages encapsulated as text/xml"
> 
> How does AMQ decide that messages are separate in a stream received?

Which part of ActiveMQ are you referring to?  The broker will get separate messages from publishers,
and as far as I know it won't ever split one message into several.  AjaxServlet sends messages
to the browser in some XML packaging, which is used by amq.js to decide which callback function
to pass each message to.

  <ajax-response>
    <response id='handlerA' destination='queue://testA' >message on queue A</response>
    <response id='handlerB' destination='queue://testB' >message on queue B</response>
  </ajax-response>

This is how the messages look in transit between AjaxServlet and amq.js.  amq.js will call
handlerA() for the first message, and handlerB() for the second message.

> 
> Does it key off line breaks "\n" or what 
> 
> A single Message is getting split into multiple messages, so I get multiple
> ones returned.

That sounds like a bug.  Can you reproduce it reliably?  What does the original message look
like, how do you send it to the broker (stomp,ajax,other?), and what does the browser see
when the messages are received?

alex


Mime
View raw message