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

Popular posts from this blog

java - Static nested class instance -

c# - Bluetooth LE CanUpdate Characteristic property -

JavaScript - Replace variable from string in all occurrences -