Example #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())
}
Example #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())
}