Esempio n. 1
0
func brokerClientsHandler(client *MQTT.Client, msg MQTT.Message) {
	brokerClients <- true
	fmt.Printf("BrokerClientsHandler      ")
	fmt.Printf("[%s]  ", msg.Topic())
	fmt.Printf("%s\n", msg.Payload())
}
Esempio n. 2
0
func onMessageReceived(client *MQTT.Client, message MQTT.Message) {
	fmt.Printf("Received message on topic: %s(%d)\n Message: %s\n", message.Topic(), message.Qos(), message.Payload())
}