From 21894c57589926b25d07135b1922f1db85455d9b Mon Sep 17 00:00:00 2001
From: RmManeschi <rmaneschi@gmail.com>
Date: Thu, 23 Nov 2017 12:07:13 +0100
Subject: [PATCH 1/2] fix bug : mqtt refuse if client has / in clientId

---
 src/tools/mqtt.go | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/tools/mqtt.go b/src/tools/mqtt.go
index 67750db..617c718 100644
--- a/src/tools/mqtt.go
+++ b/src/tools/mqtt.go
@@ -39,7 +39,8 @@ func NewMqtt(hostname string, consulClient Consul) (Mqtt, error) {
 		return nil, err
 	}
 
-	return NewMqttBasic(url, MqttStartTopic+"/"+hostname)
+	clientID := hostname + "_" + string(RandomBytes(8))
+	return NewMqttBasic(url, clientID)
 }
 
 //NewMqttBasic return a Mqtt client
-- 
GitLab


From 56b3be9c39007e79adb16317a3c0da1b0b71f716 Mon Sep 17 00:00:00 2001
From: RmManeschi <rmaneschi@gmail.com>
Date: Thu, 23 Nov 2017 12:08:08 +0100
Subject: [PATCH 2/2] changelog update

---
 CHANGELOG.md | 1 +
 1 file changed, 1 insertion(+)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3d81c42..428d39f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,7 @@
 
 * **PROVISIONER** increase timeout for http requests [57](https://gitlab.com/itk.fr/lorhammer/issues/57)
 * **CHECKER** add mqtt checker [issues/50](https://gitlab.com/itk.fr/lorhammer/issues/50)
+* **MQTT** fix bug : mosquitto refuse to talk to a client with clientId containing a / [issues/59](https://gitlab.com/itk.fr/lorhammer/issues/59)
 
 ## Version 0.4.0 - 2017-11-17 - [binaries](https://gitlab.com/itk.fr/lorhammer/tags/0.4.0)
 
-- 
GitLab