c# - How can m2mqtt subscribe two topic -


i'm using m2mqtt message ,but can't individual subscribe 2 topic

i use client.subscribe subscribe 2 topic,and use client_mqttmsgpublishreceived(object sender, mqttmsgpublisheventargs e) message

but 2 topic's message mixed . there meth divide it?

just put if statement message handler branch based on incoming messages topic e.topic.

you can write functions handle different message types , call these message handler , pass mqttmsgpublisheventargs object functions.


Comments

Popular posts from this blog

html - How to set bootstrap input responsive width? -

javascript - Highchart x and y axes data from json -

javascript - Get js console.log as python variable in QWebView pyqt -