You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by manua <ag...@gmail.com> on 2011/07/15 19:31:55 UTC

Stomp over Websocket truncates the message

HI,

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);




--
View this message in context: http://activemq.2283324.n4.nabble.com/Stomp-over-Websocket-truncates-the-message-tp3670514p3670514.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Stomp over Websocket truncates the message

Posted by manua <ag...@gmail.com>.
I have created the issue for this,

https://issues.apache.org/jira/browse/AMQ-3402

Thanks,
Manu

--
View this message in context: http://activemq.2283324.n4.nabble.com/Stomp-over-Websocket-truncates-the-message-tp3670514p3675319.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Stomp over Websocket truncates the message

Posted by Dejan Bosanac <de...@nighttale.net>.
Can you raise an issue for this and ideally create a test case that
reproduces it?

Regards
-- 
Dejan Bosanac - http://twitter.com/dejanb
-----------------
The experts in open source integration and messaging - http://fusesource.com
ActiveMQ in Action - http://www.manning.com/snyder/
Blog - http://www.nighttale.net


On Fri, Jul 15, 2011 at 7:31 PM, manua <ag...@gmail.com> wrote:

> HI,
>
> 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);
>
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/Stomp-over-Websocket-truncates-the-message-tp3670514p3670514.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>