activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From manua <agarwal.m...@gmail.com>
Subject Stomp over Websocket truncates the message
Date Fri, 15 Jul 2011 17:31:55 GMT
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.

Mime
View raw message