You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "gaikwaja (JIRA)" <ji...@apache.org> on 2015/02/10 08:02:34 UTC

[jira] [Commented] (AMQ-3402) Stomp over Websocket truncates the message body

    [ https://issues.apache.org/jira/browse/AMQ-3402?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14313709#comment-14313709 ] 

gaikwaja commented on AMQ-3402:
-------------------------------

I was able to reproduce this issue as follows opened AMQ-5572(an linked to this jira)  as unable to reopen this one 
I use samples/websocket example ,for connection to the apache-activemq-5.11.0 or apollo(1.7.1) broker,and sending message to the queue using websockets. 
On the other end is a cpp(3.8.3) client consumer listening on that queue.(from examples/stomp/cpp) 
My cpp consumer is able to receive the message but the Body of message is NilContent i.e truncated completely 
This jira has been marked as fixed in 5.6,is it possible it has regressed in latest release or apollo 1.7.1?
STOMP LOGS :
2015-02-09 03:07:00,575 | TRACE | received frame: StompFrame(SEND,List((destination,/topic/test), (content-length,41)),BufferContent(ascii: this is test message over websocket stomp),true,List()) | 
2015-02-09 03:07:00,575 | DEBUG | producer route attaching to consumer. | 
2015-02-09 03:07:00,575 | DEBUG | producer route attaching to consumer. | 
2015-02-09 03:07:00,575 | DEBUG | producer route attaching to consumer. | 
2015-02-09 03:07:00,576 | TRACE | sending frame: StompFrame(MESSAGE,List((destination,/topic/test), (content-length,41)),BufferContent(ascii: this is test message over websocket stomp),true,List((subscription,ID:mylpadeci10-57515-1423451149856-0:0:1:1), (message-id,hw-1e2))) | 
2015-02-09 03:07:00,576 | TRACE | sending frame: StompFrame(MESSAGE,List((destination,/topic/test), (content-length,41)),BufferContent(ascii: this is test message over websocket stomp),true,List((subscription,sub-0), (message-id,hw-1e2))) | 
2015-02-09 03:07:00,576 | TRACE | received frame: StompFrame(ACK,List((message-id,hw-1e2)),NilContent,true,List()) |
P.S 
I have also tried the same with apache-activemq-5.11.0 and verified that the issue exists there as well

> Stomp over Websocket truncates the message body
> -----------------------------------------------
>
>                 Key: AMQ-3402
>                 URL: https://issues.apache.org/jira/browse/AMQ-3402
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Connector
>    Affects Versions: 5.5.0
>         Environment: Ubuntu 10.1
>            Reporter: Manu Agarwal
>              Labels: Java, Script, Websocket
>
> I am using websocket for receiving messages over a queue using java script. This works fine for smaller messages, but for large messages the message.body truncates the message and also, JSON.parse(message.body) fails. 
> Is there a limit for the message size in Websockets. 
> I using java script (stomp.js) and trying to publish the messages on a web page. 
> Please find below the code snippet, 
> var url = "ws://manu.rsi.com:61614/stomp"; 
> var client = Stomp.client(url); 
> var tmp_destination = '/temp-queue/temp'; 
> function requestBlockInfo() { 
>     client.send('/queue/UI.Graph.Test.Q', {'reply-to': tmp_destination, 'command': 'blockinfo'}, "msg"); 
>     client.subscribe(tmp_destination,function(message) { 
>         alert(message.body); 
>         processMessage(JSON.parse(message.body)); 
>     }); 
> }; 
> onconnect = function(frame){ 
>         requestBlockInfo(); 
> }; 
> error_callback = function(error){ 
>     alert(error.headers.message); 
> }; 
>     
> var r = client.connect("", "" ,onconnect, error_callback); 
> When at the webpage, I received the message.body for message.body leangth greater then 60, it puts ... in between the message and truncates the message, so that its body length is 60.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)