mqttOnmessage! now return topic
This commit is contained in:
@@ -277,11 +277,10 @@ function mqttOnmessage!(client::mqttClient)
|
||||
else
|
||||
for i = 1:nmessages
|
||||
pkg = take!(get_messages_channel()) # take new arrival package
|
||||
topic = pkg.topic
|
||||
# sptoptic = split(topic, "/")
|
||||
payload = vecToDict(pkg.payload) # payload in Dict format
|
||||
|
||||
return payload
|
||||
return pkg.topic, payload
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user