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

django - (fields.E300) Field defines a relation with model 'AbstractEmailUser' which is either not installed, or is abstract -

matlab - error with cyclic autocorrelation function -

php - Using grpc in Laravel, "Class 'Grpc\ChannelCredentials' not found." -