mqttOnmessage! now return topic

This commit is contained in:
ton
2023-10-06 20:27:32 +07:00
parent e6f7d0bf5e
commit cf7065a6f5

View File

@@ -277,11 +277,10 @@ function mqttOnmessage!(client::mqttClient)
else else
for i = 1:nmessages for i = 1:nmessages
pkg = take!(get_messages_channel()) # take new arrival package pkg = take!(get_messages_channel()) # take new arrival package
topic = pkg.topic
# sptoptic = split(topic, "/") # sptoptic = split(topic, "/")
payload = vecToDict(pkg.payload) # payload in Dict format payload = vecToDict(pkg.payload) # payload in Dict format
return payload return pkg.topic, payload
end end
end end
end end