publishMessage(config, '/myTopic', 'my message').then(console.log, console.error) code example Example: console.log console.log("");