examples icon indicating copy to clipboard operation
examples copied to clipboard

who send mqtt message to topic

Open yuexian1234 opened this issue 2 years ago • 3 comments

i find the cloud app code is just update the device status, and the edge app just subcribe the mqtt topic. i want to know,who send message to mq topic? kubeedge controller or cloudapp self. thanks

yuexian1234 avatar Apr 19 '22 04:04 yuexian1234

hello. the cloud app updates the device status to kube-apiserver and the module of device controller in cloudcore will watch the modification and send it to the edgecore through cloudhub. the module of devicetwin in edgecore will rebuild the message and send it to the mq topic through event bus.

RyanZhaoXB avatar Apr 20 '22 02:04 RyanZhaoXB

hello. the cloud app updates the device status to kube-apiserver and the module of device controller in cloudcore will watch the modification and send it to the edgecore through cloudhub. the module of devicetwin in edgecore will rebuild the message and send it to the mq topic through event bus.

thanks but how the edgecore known which topic to send?

yuexian1234 avatar Apr 20 '22 04:04 yuexian1234

hello. the cloud app updates the device status to kube-apiserver and the module of device controller in cloudcore will watch the modification and send it to the edgecore through cloudhub. the module of devicetwin in edgecore will rebuild the message and send it to the mq topic through event bus.

thanks but how the edgecore known which topic to send?

we make it in the code of edgecore and mapper. every mapper on this node subscribes these topics to receive the messages and the mapper will check the device id to determine whether the message should be handled by itself.

RyanZhaoXB avatar May 05 '22 02:05 RyanZhaoXB