diff --git a/internal/endpoint/mqtt.go b/internal/endpoint/mqtt.go index eea4682f..3bd6431f 100644 --- a/internal/endpoint/mqtt.go +++ b/internal/endpoint/mqtt.go @@ -83,7 +83,9 @@ func (conn *MQTTConn) Send(msg string) error { } ops = ops.SetTLSConfig(&config) } - ops = ops.SetClientID("tile38").AddBroker(uri) + nano := time.Now().UnixNano() + clientID := fmt.Sprintf("tile38_%x", nano) //the id of connected clients should be unique + ops = ops.SetClientID(clientID).AddBroker(uri) c := paho.NewClient(ops) if token := c.Connect(); token.Wait() && token.Error() != nil {