4ib3r / StompBrokerJS

NodeJS StompBroker
MIT License
35 stars 28 forks source link

stompServer.send will lose the last 10 characters #27

Open yangdan8 opened 4 years ago

yangdan8 commented 4 years ago

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

alexhalf commented 3 years ago

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