diff --git a/src/communication.jl b/src/communication.jl index 1be7492..0cafe97 100644 --- a/src/communication.jl +++ b/src/communication.jl @@ -535,7 +535,10 @@ end # Signature """ function sendMqttMsg(outgoingMsg::Dict{Symbol, T})::NamedTuple where {T<:Any} - mqttMsgReceiveTopic = ["/GeneralUtils_sendMqttMsg/$(outgoingMsg[:msgMeta][:senderId])"] + + # sendMqttMsg() doesn't need to receive msg but mqttClientInstance_v2 requires to have receive topic + mqttMsgReceiveTopic = "/GeneralUtils_sendMqttMsg/$(outgoingMsg[:msgMeta][:senderId])" + mqttMsgReceiveChannel = (ch1=Channel(8),) keepaliveChannel = Channel(8) @@ -548,7 +551,7 @@ function sendMqttMsg(outgoingMsg::Dict{Symbol, T})::NamedTuple where {T<:Any} mqttInstance = mqttClientInstance_v2( outgoingMsg[:msgMeta][:mqttBrokerAddress], - mqttMsgReceiveTopic, + [mqttMsgReceiveTopic], mqttMsgReceiveChannel, keepaliveChannel, onMsgCallback;