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 -

Python Pandas join aggregated tables -

process - Python What is the difference between a Pool of worker processes and just running multiple Processes? -