activemq-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Timothy Bish (JIRA)" <>
Subject [jira] [Closed] (AMQ-3660) amq.js breaks messages longer than 4KB in Firefox
Date Thu, 19 May 2016 21:12:13 GMT


Timothy Bish closed AMQ-3660.
    Resolution: Unresolved

> amq.js breaks messages longer than 4KB in Firefox
> -------------------------------------------------
>                 Key: AMQ-3660
>                 URL:
>             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 demo
>            Reporter: Claudio Squarcella
>            Priority: Minor
>              Labels: 4096, 4k, activemq, firefox, js
> Hello,
> 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:
> {code:javascript}
> // Loop thru and handle each <message>
> for (var j = 0; j < responseElement.childNodes.length; j++) {
>     handler(responseElement.childNodes[j]);
> }
> {code}
> 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.
> Ciao,
> Claudio

This message was sent by Atlassian JIRA

View raw message