Closed MT22067 closed 4 months ago
Please see this example. If you want a router then see this.
The approach in paho.mqtt.golang
was not really ideal because when you connect and there are messages queued it's poaably for the client to receive the messages before it processes the Publish
(meaning messages were lost).
Thanks! @MattBrittan
Just like in the paho.mqtt.golang we had this callback function: callback mqtt.MessageHandler which was called whenever mesage was received from the broker. Usage: func (mqtt.Client).Subscribe(topic string, qos byte, callback mqtt.MessageHandler) mqtt.Token What is the alternatives of this in the current module?