func brokerClientsHandler(client *MQTT.Client, msg MQTT.Message) { brokerClients <- true fmt.Printf("BrokerClientsHandler ") fmt.Printf("[%s] ", msg.Topic()) fmt.Printf("%s\n", msg.Payload()) }
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()) }