activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claudio Squarcella (Created) (JIRA)" <>
Subject [jira] [Created] (AMQ-3660) amq.js breaks messages longer than 4KB in Firefox
Date Sun, 15 Jan 2012 20:43:39 GMT
amq.js breaks messages longer than 4KB in Firefox

                 Key: AMQ-3660
             Project: ActiveMQ
          Issue Type: Bug
    Affects Versions: 5.5.1, 5.6.0
         Environment: Standard environment, with running ActiveMQ broker and e.g. the chat
            Reporter: Claudio Squarcella
            Priority: Minor


I report a small glitch that affects the client-side Ajax script {{amq.js}} and Firefox with
big messages. It is very easy to reproduce: 
* start the ActiveMQ broker locally
* open Firefox (I am using version 8.0.1) and another browser of your choice, 
* point both of them to the chat example and join the chat,
* send a BIG string (more than 4096 chars) from the second browser,
* check the length of the string that appears on Firefox: exactly *4096 chars*.

After a bit of googling I found out that [Firefox limits the size of XML nodes to 4K|],
while in {{amq.js}} every node is handled as a separate message:
// Loop thru and handle each <message>
for (var j = 0; j < responseElement.childNodes.length; j++) {

I found out about the bug while sending rather large JSON strings, that obviously could not
be parsed. I fixed that in my code with a quite naive patch for {{amq.js}} that "glues" nodes
together in a string and handles them as a single message, but that is not always enough (e.g.
the message handler in {{chat.js}} does not accept strings).

If you guys have clever hints I will be happy to work on a patch for this.


This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message