From 20ae5e45e0ac3488303c19a85d5b5e6bdf3e9212 Mon Sep 17 00:00:00 2001 From: narawat lamaiin Date: Fri, 4 Oct 2024 13:37:56 +0700 Subject: [PATCH] update --- src/communication.jl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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;