Uploaded image for project: 'ActiveMQ Classic'
  1. ActiveMQ Classic
  2. AMQ-3402

Stomp over Websocket truncates the message body

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Incomplete
    • 5.5.0
    • None
    • Connector
    • Ubuntu 10.1

    Description

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            manua Manu Agarwal
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: