StompBrokerJS icon indicating copy to clipboard operation
StompBrokerJS copied to clipboard

stompServer.send will lose the last 10 characters

Open yangdan8 opened this issue 5 years ago • 1 comments

The following code will lose the 10 characters "0123456789": var topic ='xxx'; var data = {a:5}; stompServer.send( topic, {}, JSON.stringify({ topic, data, }) + '0123456789', );

yangdan8 avatar Sep 28 '20 03:09 yangdan8

try to use for third argument Buffer.from(JSON.stringify({ topic, data, }) + '0123456789', 'utf-8').

alexhalf avatar Oct 06 '20 12:10 alexhalf