const main = async () => { // Use code snippet from connecting to MQTT section const client = connect(); const topic = 'OrgnisationID/Arrived/AssetID'; client.subscribe(topic); client.on('message', (topic, message) => { // message is in Buffer format console.log(message.toString()) // Run your bespoke logic here }); }; main();