Example:
m:publish("/topic1/data","foo",1,0,function(client) print("published topic 1") end)
m:publish("/topic2/data","foo",1,0,function(client) print("published topic 2") end)
m:publish("/topic3/data","foo",1,0,function(client) print("published topic 3") end)
Output:
published topic 3
published topic 3
published topic 3
Build:
NodeMCU custom build by frightanic.com
branch: master
commit: c8037568571edb5c568c2f8231e4f8ce0683b883
SSL: true
modules: dht,file,gpio,mqtt,net,node,tmr,uart,wifi
build built on: 2016-03-26 14:25
powered by Lua 5.1.4 on SDK 1.4.0
UPDATE: April 2, 2016
Documented as an issue on https://github.com/nodemcu/nodemcu-firmware/issues/1217
Documentation updated to indicate the behavior.