Drastick
Drastick

Reputation: 317

Is there a size limit on objects being sent to a custom receiver app?

Im trying to pass a decent sized object to my custom receiver app but it never seems to make it through. If I take a smaller object and do JSON.stringify it then it seems to work. But regardless of if i stringify the parent object or not the sending never seems to work.

sender app

session.sendMessage(namespace, message, onSuccess.bind(this, "Message sent: " + message), onError);

receiver app

window.messageBus.onMessage = function(event) {
    console.log('Message [' + event.senderId + ']: ' + event.data);
}

Upvotes: 3

Views: 501

Answers (1)

Ali Naddaf
Ali Naddaf

Reputation: 19094

Yes, there is a size limit, try not to get close to 64K. If you need to pass something larger, then you are using the wrong mechanism; the message bus is for small messages, mostly control messages and should not be treated or used as a data channel.

Upvotes: 2

Related Questions