code: func newMqttSender(addr contract.Addressable, cert string, key string) sender {
  	protocol := strings.ToLower(addr.Protocol)
  
  	opts := MQTT.NewClientOptions()
  	broker := protocol + "://" + addr.Address + ":" + strconv.Itoa(addr.Port) + addr.Path
  	opts.AddBroker(broker)
  	opts.SetClientID(addr.Publisher)
  	opts.SetUsername(addr.User)
  	opts.SetPassword(addr.Password)
  	opts.SetAutoReconnect(false)
  
  	if protocol == "tcps" || protocol == "ssl" || protocol == "tls" {
  		cert, err := tls.LoadX509KeyPair(cert, key)
  
  		if err != nil {
  			LoggingClient.Error("Failed loading x509 data")
  			return nil
  		}
  
  		tlsConfig := &tls.Config{
  			ClientCAs:          nil,
  			InsecureSkipVerify: true,
  			Certificates:       []tls.Certificate{cert},
  		}
  
  		opts.SetTLSConfig(tlsConfig)
  
  	}
  
  	sender := &mqttSender{
  		client: MQTT.NewClient(opts),
  		topic:  addr.Topic,
  	}
  
  	return sender
  }
docs: // newMqttSender - create new mqtt sender