node.js - Mosca Mqtt Broker read published message -
hello using mosca mqtt broker want read message client publish topic.
is there way that?
in published event log packet.payload , prints clientid , topic.
server.on('published', function(packet, client) { console.log('published', packet.payload); });
thank you
server.on('published', function(packet, client) { console.log('published: ', packet.payload.tostring('utf8')); });
Comments
Post a Comment